| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/Main/multisafe.cpp $ |
| 21 | * $Revision: 210 $ |
| 22 | * $Date: 9/13/01 11:38a $ |
| 23 | * $Author: Matt $ |
| 24 | * |
| 25 | * Multiplayer safe code |
| 26 | * |
| 27 | * $Log: /DescentIII/Main/multisafe.cpp $ |
| 28 | * |
| 29 | * 210 9/13/01 11:38a Matt |
| 30 | * Made the get-player-objhandle function not return the handle for |
| 31 | * players in observer mode. |
| 32 | * |
| 33 | * 209 4/19/00 5:07p Matt |
| 34 | * From Duane for 1.4 |
| 35 | * Added checks, asserts, and fixes for bad return values |
| 36 | * |
| 37 | * 208 11/03/99 8:47p Chris |
| 38 | * Improved the auto-select algorithm for dual fire secondary weapons |
| 39 | * |
| 40 | * 207 11/03/99 6:29p Chris |
| 41 | * Improved the auto-selection code for dual fire secondary weapons |
| 42 | * |
| 43 | * 206 10/20/99 5:41p Chris |
| 44 | * Added Red GB |
| 45 | * |
| 46 | * 205 10/20/99 4:08p 3dsmax |
| 47 | * don't delete invisible powerup when deleting powerups from room |
| 48 | * |
| 49 | * 204 10/16/99 8:45p Jeff |
| 50 | * multisafe function to remove all powerups from a room |
| 51 | * |
| 52 | * 203 7/28/99 3:54p Kevin |
| 53 | * MAC |
| 54 | * |
| 55 | * 202 5/26/99 2:05a Jason |
| 56 | * fixed world position bug |
| 57 | * |
| 58 | * 201 5/23/99 9:07p Matt |
| 59 | * Changed the customtext2 multisafe functions to create the item when |
| 60 | * it's updated, instead of having a separate create and update functions. |
| 61 | * This deals with players who join a netgame after the level has started |
| 62 | * (i.e., everyone but the server). |
| 63 | * |
| 64 | * 200 5/23/99 5:58p Jason |
| 65 | * don't send rotational drag to clients |
| 66 | * |
| 67 | * 199 5/23/99 5:50p Chris |
| 68 | * Fixed problems with msafe send on over non-changed information |
| 69 | * |
| 70 | * 198 5/23/99 12:33a Chris |
| 71 | * Cannot change the control type of dying objects |
| 72 | * |
| 73 | * 197 5/22/99 12:33a Jason |
| 74 | * added sending of physics flags upon joining |
| 75 | * |
| 76 | * 196 5/21/99 4:06p Matt |
| 77 | * For customtext2 HUD items, store the buffer length in the HUD item. |
| 78 | * |
| 79 | * 195 5/21/99 3:06p Matt |
| 80 | * Changed customtext2 HUD items so that the HUD system keeps the text |
| 81 | * buffer an no one else references it directly. |
| 82 | * |
| 83 | * 194 5/20/99 5:49p Matt |
| 84 | * Added a HUD item flag, for use by Dallas-created items, that makes a |
| 85 | * HUD item persisitent for the duration of one level, but get cleared |
| 86 | * between levels. |
| 87 | * |
| 88 | * 193 5/20/99 4:12p Jeff |
| 89 | * fixed up add to inventory |
| 90 | * |
| 91 | * 192 5/20/99 2:48a Matt |
| 92 | * Changed stat type for timer & custom HUD messages. |
| 93 | * |
| 94 | * 191 5/19/99 4:23p Chris |
| 95 | * Fixed level goal problems with keys and persistant inventory items |
| 96 | * |
| 97 | * 190 5/19/99 4:01p Jason |
| 98 | * handle robot firing |
| 99 | * |
| 100 | * 189 5/19/99 12:12p Jason |
| 101 | * fixed some issues with multiplayer |
| 102 | * |
| 103 | * 188 5/19/99 11:26a Matt |
| 104 | * Added multisafe functions & Dallas actions for showing a timer on the |
| 105 | * screen and adding custom HUD messages. |
| 106 | * |
| 107 | * 187 5/18/99 6:09p Kevin |
| 108 | * for Jeff. fixed crash in multiplayer |
| 109 | * |
| 110 | * 186 5/17/99 6:22p Jeff |
| 111 | * added filtered HUD messages |
| 112 | * |
| 113 | * 185 5/17/99 4:09p Jeff |
| 114 | * fixed secondary autoselect if the thief steals your currently selected |
| 115 | * secondary and you have no more |
| 116 | * |
| 117 | * 184 5/11/99 11:49a Matt |
| 118 | * Added the ability to specify a name when adding an item to the |
| 119 | * inventory. |
| 120 | * |
| 121 | * 183 5/10/99 10:23p Ardussi |
| 122 | * changes to compile on Mac |
| 123 | * |
| 124 | * 182 5/10/99 2:37a Jason |
| 125 | * fixed potential crash bug with lightning effects |
| 126 | * |
| 127 | * 181 5/09/99 10:49p Jason |
| 128 | * fix string chopping in multiplayer games |
| 129 | * |
| 130 | * 180 5/08/99 4:06p Matt |
| 131 | * Made Guidebot name translation work for game messages. |
| 132 | * |
| 133 | * 179 5/07/99 11:55p Matt |
| 134 | * Made player key action work if passed a player weapon or a player. |
| 135 | * |
| 136 | * 178 5/07/99 10:57p Chris |
| 137 | * Added a spew uvec dir |
| 138 | * |
| 139 | * 177 5/07/99 10:49p Matt |
| 140 | * For GB HUD messages, only make the sound if the message is actually |
| 141 | * added (i.e., if it isn't the same as the last message). |
| 142 | * |
| 143 | * 176 5/07/99 1:32p Jeff |
| 144 | * made osipf for sounds multisafe |
| 145 | * |
| 146 | * 175 5/06/99 12:52p Jason |
| 147 | * fixed set on fire bug |
| 148 | * |
| 149 | * 174 5/06/99 5:44a Chris |
| 150 | * Exclude GBs from the delete robot lists |
| 151 | * |
| 152 | * 173 5/06/99 4:11a Jeff |
| 153 | * created multisafe function to destroy robots in the level (helps boss |
| 154 | * fights) |
| 155 | * |
| 156 | * 172 5/05/99 12:55a Chris |
| 157 | * Setting a dead object's shields makes it no longer OF_AI_DEATH |
| 158 | * |
| 159 | * 171 5/04/99 12:13p Matt |
| 160 | * Renamed fire-flare symbol to fire-weapon. |
| 161 | * |
| 162 | * 170 5/04/99 1:04a Matt |
| 163 | * Turned fire flare function into fire weapon, though I haven't yet |
| 164 | * actually changed the name. |
| 165 | * |
| 166 | * 169 5/02/99 5:09a Jeff |
| 167 | * send levelgoal state to joining clients |
| 168 | * |
| 169 | * 168 5/02/99 1:36a Jason |
| 170 | * added moving object lighting viseffects |
| 171 | * |
| 172 | * 167 5/01/99 1:41a Jeff |
| 173 | * made levelgoals multi friendly |
| 174 | * |
| 175 | * 166 4/30/99 4:32p Matt |
| 176 | * Added a Dallas action to fire a flare from an object. |
| 177 | * |
| 178 | * 165 4/29/99 7:21p Jason |
| 179 | * fixed some wacky spew issues |
| 180 | * |
| 181 | * 164 4/29/99 1:28p Jeff |
| 182 | * fixed errant hud messages being displayed for wrong people |
| 183 | * |
| 184 | * 163 4/29/99 2:01a Chris |
| 185 | * Added the portal blockage support |
| 186 | * |
| 187 | * 162 4/28/99 9:49p Jeff |
| 188 | * handle player or player weapon types |
| 189 | * |
| 190 | * 161 4/27/99 9:20p Jason |
| 191 | * fixed key spewing |
| 192 | * |
| 193 | * 160 4/27/99 4:43a Jeff |
| 194 | * added multisafe function for setting/getting guidebot name, fixed msafe |
| 195 | * object flag set for clients |
| 196 | * |
| 197 | * 159 4/26/99 11:46p Matt |
| 198 | * Don't give the player a key if he's already got it. |
| 199 | * |
| 200 | * 158 4/26/99 8:16p Jason |
| 201 | * added sparks type |
| 202 | * |
| 203 | * 157 4/26/99 11:14a Jason |
| 204 | * more levelgoal work for Chris |
| 205 | * |
| 206 | * 156 4/26/99 4:27a Jeff |
| 207 | * added multisafe functions to check a player's weapons, and add/remove |
| 208 | * weapons from a player |
| 209 | * |
| 210 | * 155 4/25/99 10:13p Matt |
| 211 | * Added code to scan HUD messages for messages from the Guide-Bot, and |
| 212 | * print them using the GB message format. |
| 213 | * |
| 214 | * 154 4/24/99 6:45p Jeff |
| 215 | * added functions for theif so he can steal things other than weapons |
| 216 | * |
| 217 | * 153 4/23/99 11:00p Jeff |
| 218 | * added Afterburner HUD name |
| 219 | * |
| 220 | * 152 4/22/99 7:12p Jeff |
| 221 | * don't send object remove (it calls MultiSendRemoveObject) |
| 222 | * |
| 223 | * 151 4/22/99 4:44p Jason |
| 224 | * fixed level goal stuff for multiplayer |
| 225 | * |
| 226 | * 150 4/22/99 3:43p Kevin |
| 227 | * Training missions show controls on screen |
| 228 | * |
| 229 | * 149 4/22/99 3:24p Jason |
| 230 | * fixed some multisafe problems |
| 231 | * |
| 232 | * 148 4/20/99 7:29p Jeff |
| 233 | * difficulty based shields & energy |
| 234 | * |
| 235 | * 147 4/20/99 6:55p Matt |
| 236 | * Added code to keep a bitmask of all keys held by all players, and to |
| 237 | * allow a robot to open a door if any player has the key(s) for that |
| 238 | * door. |
| 239 | * |
| 240 | * 146 4/18/99 3:06p Jason |
| 241 | * fixed printing of hud message on the wrong players machine |
| 242 | * |
| 243 | * 145 4/17/99 3:45p Matt |
| 244 | * Add keys to the player's inventory. |
| 245 | * |
| 246 | * 144 4/14/99 11:54a Jason |
| 247 | * added message in multipay |
| 248 | * |
| 249 | * 143 4/14/99 3:56a Jeff |
| 250 | * fixed case mismatch in #includes |
| 251 | * |
| 252 | * 142 4/12/99 6:15p Samir |
| 253 | * Sound priorities pass 1 |
| 254 | * |
| 255 | * 141 4/11/99 6:44p Matt |
| 256 | * Moved/renamed some text symbols that were in multisafe but belonged in |
| 257 | * stringtable |
| 258 | * |
| 259 | * 140 4/07/99 12:30p Matt |
| 260 | * Added code for failed missions. |
| 261 | * |
| 262 | * 139 4/06/99 11:44p Matt |
| 263 | * Added action to create a lighting bolt between two gunpoints on the |
| 264 | * same object, and queries to return an object's original shields and to |
| 265 | * multiply a percent times a float. |
| 266 | * |
| 267 | * 138 4/06/99 8:44p Matt |
| 268 | * Added a couple actions for Mark's energy/shield collector |
| 269 | * |
| 270 | * 137 4/06/99 6:24p Jason |
| 271 | * various fixes for multiplayer |
| 272 | * |
| 273 | * 136 4/04/99 6:20p Matt |
| 274 | * Added distance-based shake Dallas action. |
| 275 | * |
| 276 | * 135 4/03/99 5:23p Matt |
| 277 | * Removed placeholder code for Possession and Hint Reveal powerups. |
| 278 | * |
| 279 | * 134 4/03/99 1:13a Jeff |
| 280 | * added multisafe/dallas actions to set an object on fire |
| 281 | * |
| 282 | * 133 4/02/99 10:12p Jeff |
| 283 | * made ship permissions multi safe |
| 284 | * |
| 285 | * 132 4/02/99 9:33p Jeff |
| 286 | * added full map |
| 287 | * |
| 288 | * 131 3/31/99 11:41a Jason |
| 289 | * added support for attached thick lightning |
| 290 | * |
| 291 | * 130 3/30/99 7:26p Chris |
| 292 | * |
| 293 | * 128 3/29/99 7:30p Jason |
| 294 | * added cool new energy effect |
| 295 | * |
| 296 | * 127 3/28/99 5:56p Matt |
| 297 | * Added Dallas action to turn on object sparking |
| 298 | * |
| 299 | * 126 3/27/99 2:15p Jason |
| 300 | * added better thick lightining |
| 301 | * |
| 302 | * 125 3/26/99 3:25p Jeff |
| 303 | * option to display hud message when cloaking |
| 304 | * |
| 305 | * 124 3/26/99 12:38p Jeff |
| 306 | * added cloak predefs |
| 307 | * |
| 308 | * 123 3/25/99 3:30p Jason |
| 309 | * added option to randomize powerup respawn points |
| 310 | * |
| 311 | * 122 3/24/99 6:02p Jason |
| 312 | * fixed size for thick lightning |
| 313 | * |
| 314 | * 121 3/24/99 10:02a Matt |
| 315 | * Added Dallas action to set music region for all players |
| 316 | * |
| 317 | * 120 3/23/99 3:51p Jason |
| 318 | * added lightning bolt effect to msafe |
| 319 | * |
| 320 | * 119 3/22/99 1:59p Matt |
| 321 | * Added break glass Dallas action |
| 322 | * |
| 323 | * 118 3/22/99 11:26a Matt |
| 324 | * Changed energy powerup pickup behavior, and added energy full message. |
| 325 | * |
| 326 | * 117 3/22/99 10:59a Chris |
| 327 | * Awareness code was tweaked. Multisafe stuff added for objects. |
| 328 | * |
| 329 | * 116 3/16/99 6:43p Kevin |
| 330 | * OEM Split fixes |
| 331 | * |
| 332 | * 115 3/12/99 7:50p Jeff |
| 333 | * demo record a powerup being set dead if msafe says so |
| 334 | * |
| 335 | * 114 3/10/99 2:25p Kevin |
| 336 | * Save/Load and Demo file fixes |
| 337 | * |
| 338 | * 113 3/05/99 12:18p Matt |
| 339 | * Fixed, I hope, a bunch of ammo and weapon bugs |
| 340 | * |
| 341 | * 112 3/04/99 8:50p Samir |
| 342 | * AddColoredHUDMessage is formatted, so when mulitplayer messages went |
| 343 | * out, they would take the % signs and screw up the string. Now it |
| 344 | * doesn't. |
| 345 | * |
| 346 | * 111 3/04/99 7:39p Matt |
| 347 | * Added sound effects to FreeSpace-style persistent HUD messages. |
| 348 | * |
| 349 | * 110 3/04/99 7:01p Matt |
| 350 | * Fixed max ammo bug, and took out hack to set max ammo |
| 351 | * |
| 352 | * 109 3/04/99 6:30p Jason |
| 353 | * took out comments |
| 354 | * |
| 355 | * 108 3/04/99 6:29p Jason |
| 356 | * added more multiplayer functionality |
| 357 | * |
| 358 | * 107 3/04/99 6:04p Matt |
| 359 | * Made music region work for the specified object. |
| 360 | * Added sound effect & FreeSpace draw to game message. |
| 361 | * |
| 362 | * 106 3/04/99 3:46p Jason |
| 363 | * fixed some multisafe stuff |
| 364 | * |
| 365 | * 105 3/03/99 5:35p Matt |
| 366 | * Added fade-out for goal complete messages |
| 367 | * |
| 368 | * 104 3/03/99 5:08p Samir |
| 369 | * AddWeaponAmmoToPlayer added. |
| 370 | * |
| 371 | * 103 3/03/99 4:39p Matt |
| 372 | * Fixed some prematurely-check-in code. |
| 373 | * |
| 374 | * 102 3/03/99 3:02p Matt |
| 375 | * Added Game Message action in Dallas |
| 376 | * |
| 377 | * 101 3/02/99 1:31p Matt |
| 378 | * Added hack for secondary weapon ammo max not set |
| 379 | * |
| 380 | * 100 3/02/99 12:22p Matt |
| 381 | * Revisions to weapon & ammo powerups. Not fully tested. |
| 382 | * |
| 383 | * 99 3/01/99 1:09p Matt |
| 384 | * Changed validate functions to do an int3 & return nicely rather than |
| 385 | * error out |
| 386 | * |
| 387 | * 98 2/25/99 8:55p Jeff |
| 388 | * Inventory supports level change persistant items. Inventory supports |
| 389 | * time-out objects. Inventory Reset changed (takes a level of reset |
| 390 | * now). Quad lasers stay across level change (single player). Guidebot |
| 391 | * bug fixed (now back in ship on level start). Quads time out when |
| 392 | * spewed. Invulnerability and cloak powerups no longer use game |
| 393 | * event/callbacks, so they can be saved in game saves (moved to |
| 394 | * MakePlayerInvulnerable and MakeObjectInvisible) |
| 395 | * |
| 396 | * 97 2/23/99 7:36p Jeff |
| 397 | * handle non-spewing inventory item add |
| 398 | * |
| 399 | * 96 2/22/99 1:20a Jeff |
| 400 | * added support for inventory (simple) in dallas. Moved end-level |
| 401 | * sequence to use IGC. Add position clipboard stuff for dallas. Fixed |
| 402 | * some inventory bug with storing object handles |
| 403 | * |
| 404 | * 95 2/21/99 8:36p Jeff |
| 405 | * misc changes to handle new matcen and path types of dallas |
| 406 | * |
| 407 | * 94 2/21/99 5:49p Matt |
| 408 | * Added Dallas action to set an object's volume |
| 409 | * |
| 410 | * 93 2/19/99 7:14p Luke |
| 411 | * ghost and unghost dont cause int3s |
| 412 | * |
| 413 | * 92 2/16/99 6:26p Matt |
| 414 | * Fixed bug in get player handle code & cleaned it up a bit besides |
| 415 | * |
| 416 | * 91 2/15/99 11:09a Matt |
| 417 | * Added function to count the number of a certain type of object in the |
| 418 | * level. (Also added HUD actions to print an int and float.) |
| 419 | * |
| 420 | * 90 2/11/99 1:44p Matt |
| 421 | * Fixed compile warning |
| 422 | * |
| 423 | * 89 2/11/99 1:10p Matt |
| 424 | * Added functions to get & set a triggers enabled/disabled state |
| 425 | * |
| 426 | * 88 2/11/99 2:56a Jeff |
| 427 | * added multisafe function to set an objects position in the world |
| 428 | * |
| 429 | * 87 2/10/99 7:14p Jeff |
| 430 | * 4 proxmines instead of 1 |
| 431 | * |
| 432 | * 86 2/10/99 6:55p Jeff |
| 433 | * added proxmines to the game |
| 434 | * |
| 435 | * 85 2/10/99 3:48p Jason |
| 436 | * table filter changes |
| 437 | * |
| 438 | * 84 2/10/99 1:47p Matt |
| 439 | * Changed object handle symbolic constants |
| 440 | * |
| 441 | * 83 2/09/99 12:43p Matt |
| 442 | * Added function to check for players in a room |
| 443 | * |
| 444 | * 82 2/09/99 11:57a Jeff |
| 445 | * quad fire now goes into your inventory so you spew it |
| 446 | * |
| 447 | * 81 2/08/99 7:05p Kevin |
| 448 | * Trying to get demo system working with powerup scripts |
| 449 | * |
| 450 | * 80 2/08/99 5:25p Jeff |
| 451 | * removed all calls to MultiSendRemoveObject, incorportated into |
| 452 | * SetObjectDeadFlag. Fixes sequencing issues in multiplayer |
| 453 | * |
| 454 | * 79 2/08/99 3:09a Jeff |
| 455 | * added a multisafe type to switch a player in and out of ai control mode |
| 456 | * (and to get whether a player is in ai mode or not) |
| 457 | * |
| 458 | * 78 2/06/99 10:03p Matt |
| 459 | * Added keys system |
| 460 | * |
| 461 | * 77 2/06/99 1:52a Matt |
| 462 | * Added a bunch of Dallas funcs, mostly for Sean |
| 463 | * |
| 464 | * 76 2/04/99 12:26p Jason |
| 465 | * added spew that was better for multiplayer |
| 466 | * |
| 467 | * 75 2/03/99 5:49p Matt |
| 468 | * Added room damage system |
| 469 | * |
| 470 | * 74 2/03/99 4:26p Jason |
| 471 | * made multiplayer coop actually work! |
| 472 | * |
| 473 | * 73 2/03/99 12:24a Matt |
| 474 | * Got HUD message, 2D sound, streaming sound, and player-is-visible all |
| 475 | * working correctly in multiplayer. |
| 476 | * |
| 477 | * 72 2/02/99 12:43p Kevin |
| 478 | * Fixes to the Save/Load game system, and the demo system to work with |
| 479 | * the new OSIRIS |
| 480 | * |
| 481 | * 71 2/01/99 4:17p Jason |
| 482 | * more changes for multisafe |
| 483 | * |
| 484 | * 70 2/01/99 3:47p Jason |
| 485 | * added more multisafe functionality |
| 486 | * |
| 487 | * 69 2/01/99 2:31p Jason |
| 488 | * made player handle grabbing more reliable |
| 489 | * |
| 490 | * 68 2/01/99 1:11p Matt |
| 491 | * Changed a bunch of stuff to work with object handles instead of player |
| 492 | * numbers. Also fixed the view cone action, which ignored distance. |
| 493 | * |
| 494 | * 67 1/31/99 11:05p Matt |
| 495 | * Added music region set |
| 496 | * |
| 497 | * 66 1/31/99 8:11p Matt |
| 498 | * Added player visible query, and made zoom work with popup cameras. |
| 499 | * |
| 500 | * 65 1/31/99 7:26p Matt |
| 501 | * Renamed a bunch of functions to have HUD capitalized |
| 502 | * |
| 503 | * 64 1/30/99 3:19p Matt |
| 504 | * Made Dallas spews work from object centers in addition to gunpoints |
| 505 | * |
| 506 | * 63 1/29/99 5:22p Jeff |
| 507 | * localization |
| 508 | * |
| 509 | * 62 1/29/99 3:14p Matt |
| 510 | * Deleted some obsolete Dallas actions, and made the player controls |
| 511 | * actions take player numbers instead of the player object. |
| 512 | * |
| 513 | * 61 1/29/99 12:48p Matt |
| 514 | * Rewrote the doorway system |
| 515 | * |
| 516 | * 60 1/26/99 5:16p Matt |
| 517 | * Added STOP_SOUND_OBJ |
| 518 | * |
| 519 | * 59 1/26/99 4:03p Jason |
| 520 | * fixed bad object invulnerable code that someone wrote |
| 521 | * |
| 522 | * 58 1/25/99 7:06p Matt |
| 523 | * Ripped out doorway index stuff, since doors are referred to by their |
| 524 | * door objects. |
| 525 | * |
| 526 | * 57 1/25/99 6:30p Matt |
| 527 | * Made sound functions take sound num instead of name, and door functions |
| 528 | * take object handle instead of doorway index. |
| 529 | * |
| 530 | * 56 1/23/99 10:10p Kevin |
| 531 | * Added the start of osiris support into the demo system |
| 532 | * |
| 533 | * 55 1/22/99 6:53p Chris |
| 534 | * Fixed LoadandBind Aux notify problems, fixed static path problems, |
| 535 | * fixed AIF_FORCE_AWARE Problems, improved path code |
| 536 | * |
| 537 | * 54 1/21/99 11:15p Jeff |
| 538 | * pulled out some structs and defines from header files and moved them |
| 539 | * into seperate header files so that multiplayer dlls don't require major |
| 540 | * game headers, just those new headers. Side effect is a shorter build |
| 541 | * time. Also cleaned up some header file #includes that weren't needed. |
| 542 | * This affected polymodel.h, object.h, player.h, vecmat.h, room.h, |
| 543 | * manage.h and multi.h |
| 544 | * |
| 545 | * 53 1/20/99 8:29p Matt |
| 546 | * Added a comment block listing what functions have been added or |
| 547 | * modified. |
| 548 | * |
| 549 | * 52 1/20/99 6:26p Matt |
| 550 | * Added several actions |
| 551 | * |
| 552 | * 51 1/20/99 4:33p Jason |
| 553 | * added changing wind/fog to msafe |
| 554 | * |
| 555 | * 50 1/20/99 2:13a Chris |
| 556 | * It is now possible for robots to have special immunities, resistances, |
| 557 | * and vunerabilities |
| 558 | * |
| 559 | * 49 1/19/99 10:27p Jeff |
| 560 | * in single player, primaries will give you energy if you already have |
| 561 | * the weapon |
| 562 | * |
| 563 | * 48 1/19/99 6:53p Matt |
| 564 | * Added some error checking |
| 565 | * |
| 566 | * 47 1/19/99 6:13p Matt |
| 567 | * Added an action & query for lighting distance |
| 568 | * |
| 569 | * 46 1/19/99 3:43p Kevin |
| 570 | * Added msafe functionality to set an object to render type RT_NONE |
| 571 | * |
| 572 | * 45 1/19/99 12:16p Matt |
| 573 | * Added start endlevel sequence action |
| 574 | * |
| 575 | * 44 1/18/99 7:31p Matt |
| 576 | * Added a bunch of Dallas actions |
| 577 | * |
| 578 | * 43 1/18/99 6:18p Kevin |
| 579 | * Added controller masking to DALLAS |
| 580 | * |
| 581 | * 42 1/18/99 2:46p Matt |
| 582 | * Combined flags & flags2 fields in object struct |
| 583 | * |
| 584 | * 41 1/15/99 10:44a Jason |
| 585 | * fixed fog bug |
| 586 | * |
| 587 | * 40 1/13/99 2:29p Jeff |
| 588 | * state is set of the mstruct for when getting a doorway index (if the |
| 589 | * door doesn't exist anymore...the object handle) |
| 590 | * |
| 591 | * 39 1/13/99 12:42p Matt |
| 592 | * Added code to close a popup view |
| 593 | * |
| 594 | * 38 1/11/99 2:14p Chris |
| 595 | * Massive work on OSIRIS and AI |
| 596 | * |
| 597 | * 37 1/11/99 10:43a Matt |
| 598 | * Made forcefield on/off/toggle optionally do both sides of a portal |
| 599 | * |
| 600 | * 36 1/08/99 4:33p Matt |
| 601 | * Got popup views working in Dallas |
| 602 | * |
| 603 | * 35 1/06/99 5:06p Chris |
| 604 | * Improving OSIRIS/game intergration - improved support for custom |
| 605 | * animations |
| 606 | * |
| 607 | * 34 1/06/99 4:23p Jeff |
| 608 | * added a couple of inventory and counter measure functions |
| 609 | * |
| 610 | * 33 1/06/99 1:46p Jeff |
| 611 | * cloak and invuln put in multisafe |
| 612 | * |
| 613 | * 32 1/05/99 3:41p Jeff |
| 614 | * added spew create and stop functions |
| 615 | * |
| 616 | * 31 1/05/99 12:42p Jason |
| 617 | * fixed missing break |
| 618 | * |
| 619 | * 30 1/05/99 11:52a Jason |
| 620 | * added more msafe functionality |
| 621 | * |
| 622 | * 29 1/04/99 12:24p Jeff |
| 623 | * added invulnerablilty and cloak. FInished up rest of powerups |
| 624 | * |
| 625 | * 28 12/31/98 7:36p Jeff |
| 626 | * correctly hash type/ids for multisafe. Added some new inline functions |
| 627 | * to add/get type/id to a packet |
| 628 | * |
| 629 | * 27 12/30/98 6:05p Jason |
| 630 | * added some inventory functions |
| 631 | * |
| 632 | * 26 12/30/98 2:17p Jason |
| 633 | * added MSAFE_DOOR_DOORWAY_INDEX |
| 634 | * |
| 635 | * 25 12/30/98 1:37p Jason |
| 636 | * added waypoint function |
| 637 | * |
| 638 | * 24 12/30/98 12:09p Jason |
| 639 | * added logfile |
| 640 | */ |
| 641 | #include "multisafe.h"cxx . . $ `<file>/Descent3/multisafe.h`/ |
| 642 | #include "weather.h"cxx . . $ `<file>/Descent3/weather.h`/ |
| 643 | #include "room.h"cxx . . $ `<file>/Descent3/room.h`/ |
| 644 | #include "game.h"cxx . . $ `<file>/Descent3/game.h`/ |
| 645 | #include "multi.h"cxx . . $ `<file>/Descent3/multi.h`/ |
| 646 | #include "damage.h"cxx . . $ `<file>/Descent3/damage.h`/ |
| 647 | #include "hud.h"cxx . . $ `<file>/Descent3/hud.h`/ |
| 648 | #include "doorway.h"cxx . . $ `<file>/Descent3/doorway.h`/ |
| 649 | #include "trigger.h"cxx . . $ `<file>/Descent3/trigger.h`/ |
| 650 | #include "gamepath.h"cxx . . $ `<file>/Descent3/gamepath.h`/ |
| 651 | #include "AIGoal.h"cxx . . $ `<file>/Descent3/AIGoal.h`/ |
| 652 | #include "weapon.h"cxx . . $ `<file>/Descent3/weapon.h`/ |
| 653 | #include "spew.h"cxx . . $ `<file>/Descent3/spew.h`/ |
| 654 | #include "hlsoundlib.h"cxx . . $ `<file>/sndlib/hlsoundlib.h`/ |
| 655 | #include "sounds.h"cxx . . $ `<file>/Descent3/sounds.h`/ |
| 656 | #include "ship.h"cxx . . $ `<file>/Descent3/ship.h`/ |
| 657 | #include "player.h"cxx . . $ `<file>/Descent3/player.h`/ |
| 658 | #include "object_lighting.h"cxx . . $ `<file>/Descent3/object_lighting.h`/ |
| 659 | #include "soundload.h"cxx . . $ `<file>/sndlib/soundload.h`/ |
| 660 | #include "streamaudio.h"cxx . . $ `<file>/stream_audio/streamaudio.h`/ |
| 661 | #include "gamesequence.h"cxx . . $ `<file>/Descent3/gamesequence.h`/ |
| 662 | #include "gameevent.h"cxx . . $ `<file>/Descent3/gameevent.h`/ |
| 663 | #include "SmallViews.h"cxx . . $ `<file>/Descent3/SmallViews.h`/ |
| 664 | #include "difficulty.h"cxx . . $ `<file>/Descent3/difficulty.h`/ |
| 665 | #include "door.h"cxx . . $ `<file>/Descent3/door.h`/ |
| 666 | #include "demofile.h"cxx . . $ `<file>/lib/demofile.h`/ |
| 667 | #include "stringtable.h"cxx . . $ `<file>/Descent3/stringtable.h`/ |
| 668 | #include "d3music.h"cxx . . $ `<file>/Descent3/d3music.h`/ |
| 669 | #include "multi_world_state.h"cxx . . $ `<file>/Descent3/multi_world_state.h`/ |
| 670 | #include "osiris_predefs.h"cxx . . $ `<file>/Descent3/osiris_predefs.h`/ |
| 671 | #include "viseffect.h"cxx . . $ `<file>/Descent3/viseffect.h`/ |
| 672 | #include "levelgoal.h"cxx . . $ `<file>/Descent3/levelgoal.h`/ |
| 673 | |
| 674 | #include <algorithm> |
| 675 | |
| 676 | /* |
| 677 | The following functions have been added or modified by Matt and/or someone else other than Jason, |
| 678 | and thus Jason should check them out to make sure they're ok for multiplayer. |
| 679 | |
| 680 | */ |
| 681 | // Returns true if the player has this weapon (this fuction should be moved) |
| 682 | bool PlayerHasWeaponcxx . . $ PlayerHasWeapon(cf9ef193275fa6d8).(int slot, int weapon_index); |
| 683 | int AddWeaponAmmocxx . . $ AddWeaponAmmo(2326284602b0bb2d).(int slot, int weap_index, int ammo); |
| 684 | void CheckForWeaponSelectcxx . . $ CheckForWeaponSelect(3e454b8ccf442868).(int id, int weapon_index); |
| 685 | #define MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`! (ObjGet(mstruct->objhandle)) |
| 686 | #define KOBJcxx . . $ `Descent3/multisafe.cpp:686:9`! (ObjGet(mstruct->killer_handle)) |
| 687 | #define IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`! (ObjGet(mstruct->ithandle)) |
| 688 | // Returns true if the specified room is valid |
| 689 | bool VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(int roomnum) { |
| 690 | |
| 691 | bool valid = ((roomnum >= 0) && (roomnum <= Highest_room_indexcxx . . $ Highest_room_index.) && Roomscxx . . $ Rooms.[roomnum].usedcxx . . $ room#used.); |
| 692 | if (!valid) |
| 693 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 694 | return valid; |
| 695 | } |
| 696 | // Returns true if the specified room & face are valid |
| 697 | bool VALIDATE_ROOM_FACEcxx . . $ VALIDATE_ROOM_FACE(cf9ef193275fa6d8).(int roomnum, int facenum) { |
| 698 | |
| 699 | bool valid = ((roomnum >= 0) && (roomnum <= Highest_room_indexcxx . . $ Highest_room_index.) && (Roomscxx . . $ Rooms.[roomnum].usedcxx . . $ room#used.) && (facenum >= 0) && |
| 700 | (facenum < Roomscxx . . $ Rooms.[roomnum].num_facescxx . . $ room#num_faces.)); |
| 701 | if (!valid) |
| 702 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 703 | return valid; |
| 704 | } |
| 705 | // Returns true if the specified room & portal are valid |
| 706 | bool VALIDATE_ROOM_PORTALcxx . . $ VALIDATE_ROOM_PORTAL(cf9ef193275fa6d8).(int roomnum, int portalnum) { |
| 707 | |
| 708 | bool valid = ((roomnum >= 0) && (roomnum <= Highest_room_indexcxx . . $ Highest_room_index.) && (Roomscxx . . $ Rooms.[roomnum].usedcxx . . $ room#used.) && (portalnum >= 0) && |
| 709 | (portalnum < Roomscxx . . $ Rooms.[roomnum].num_portalscxx . . $ room#num_portals.)); |
| 710 | if (!valid) |
| 711 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 712 | return valid; |
| 713 | } |
| 714 | // Returns an object pointer from a handle. Really just ObjGet() with an mprintf() |
| 715 | objectcxx . . $ object# *VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(int handle) { |
| 716 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(handle); |
| 717 | if (!objp) { |
| 718 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid object passed to multisafe.\n"); |
| 719 | } |
| 720 | return objp; |
| 721 | } |
| 722 | |
| 723 | // Gets a value for the calling party |
| 724 | void msafe_GetValuecxx . . $ msafe_GetValue(a41cef1a93aeae18).(int type, msafe_structcxx . . $ msafe_struct# *mstruct) { |
| 725 | objectcxx . . $ object# *objp; |
| 726 | switch (type) { |
| 727 | case MSAFE_SHOW_ENABLED_CONTROLScxx . . $ `scripts/osiris_common.h:856:9`!: |
| 728 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 729 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) |
| 730 | mstruct->statecxx . . $ msafe_struct#state. = Hud_show_controlscxx . . $ Hud_show_controls.; |
| 731 | else |
| 732 | mstruct->statecxx . . $ msafe_struct#state. = false; |
| 733 | break; |
| 734 | break; |
| 735 | case MSAFE_OBJECT_PLAYER_CMASKcxx . . $ `scripts/osiris_common.h:839:9`!: |
| 736 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 737 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) |
| 738 | mstruct->control_maskcxx . . $ msafe_struct#control_mask. = Playerscxx . . $ Players.[objp->idcxx . . $ object#id.].controller_bitflagscxx . . $ player#controller_bitflags.; |
| 739 | else |
| 740 | mstruct->control_maskcxx . . $ msafe_struct#control_mask. = 0; |
| 741 | break; |
| 742 | case MSAFE_OBJECT_POScxx . . $ `scripts/osiris_common.h:820:9`!: |
| 743 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 744 | if (!objp) |
| 745 | mstruct->poscxx . . $ msafe_struct#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 746 | else |
| 747 | mstruct->poscxx . . $ msafe_struct#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->poscxx . . $ object#pos.; |
| 748 | break; |
| 749 | case MSAFE_OBJECT_ORIENTcxx . . $ `scripts/osiris_common.h:821:9`!: |
| 750 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 751 | if (!objp) |
| 752 | mstruct->orientcxx . . $ msafe_struct#orient. =cxx . . $ matrix#`operator=`(4c6f8b29806742). Identity_matrixcxx . . $ Identity_matrix.; |
| 753 | else |
| 754 | mstruct->orientcxx . . $ msafe_struct#orient. =cxx . . $ matrix#`operator=`(4c6f8b29806742). objp->orientcxx . . $ object#orient.; |
| 755 | break; |
| 756 | case MSAFE_OBJECT_ROOMNUMcxx . . $ `scripts/osiris_common.h:822:9`!: |
| 757 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 758 | if (!objp) |
| 759 | mstruct->roomnumcxx . . $ msafe_struct#roomnum. = -1; |
| 760 | else |
| 761 | mstruct->roomnumcxx . . $ msafe_struct#roomnum. = objp->roomnumcxx . . $ object#roomnum.; |
| 762 | break; |
| 763 | case MSAFE_OBJECT_WORLD_POSITIONcxx . . $ `scripts/osiris_common.h:846:9`!: |
| 764 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 765 | if (!objp) { |
| 766 | mstruct->poscxx . . $ msafe_struct#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 767 | mstruct->orientcxx . . $ msafe_struct#orient. =cxx . . $ matrix#`operator=`(4c6f8b29806742). Identity_matrixcxx . . $ Identity_matrix.; |
| 768 | mstruct->roomnumcxx . . $ msafe_struct#roomnum. = -1; |
| 769 | } else { |
| 770 | mstruct->orientcxx . . $ msafe_struct#orient. =cxx . . $ matrix#`operator=`(4c6f8b29806742). objp->orientcxx . . $ object#orient.; |
| 771 | mstruct->roomnumcxx . . $ msafe_struct#roomnum. = objp->roomnumcxx . . $ object#roomnum.; |
| 772 | mstruct->poscxx . . $ msafe_struct#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->poscxx . . $ object#pos.; |
| 773 | } |
| 774 | break; |
| 775 | case MSAFE_OBJECT_VELOCITYcxx . . $ `scripts/osiris_common.h:823:9`!: |
| 776 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 777 | if (!objp || (objp->movement_typecxx . . $ object#movement_type. != MT_WALKINGcxx . . $ `Descent3/object_external.h:235:9`! && objp->movement_typecxx . . $ object#movement_type. != MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!)) |
| 778 | mstruct->velocitycxx . . $ msafe_struct#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 779 | else |
| 780 | mstruct->velocitycxx . . $ msafe_struct#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity.; |
| 781 | break; |
| 782 | case MSAFE_OBJECT_ROTVELOCITYcxx . . $ `scripts/osiris_common.h:824:9`!: |
| 783 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 784 | if (!objp || (objp->movement_typecxx . . $ object#movement_type. != MT_WALKINGcxx . . $ `Descent3/object_external.h:235:9`! && objp->movement_typecxx . . $ object#movement_type. != MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!)) |
| 785 | mstruct->rot_velocitycxx . . $ msafe_struct#rot_velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 786 | else |
| 787 | mstruct->rot_velocitycxx . . $ msafe_struct#rot_velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel.; |
| 788 | break; |
| 789 | case MSAFE_OBJECT_THRUSTcxx . . $ `scripts/osiris_common.h:825:9`!: |
| 790 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 791 | if (!objp || (objp->movement_typecxx . . $ object#movement_type. != MT_WALKINGcxx . . $ `Descent3/object_external.h:235:9`! && objp->movement_typecxx . . $ object#movement_type. != MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!)) |
| 792 | mstruct->thrustcxx . . $ msafe_struct#thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 793 | else |
| 794 | mstruct->thrustcxx . . $ msafe_struct#thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust.; |
| 795 | break; |
| 796 | case MSAFE_OBJECT_ROTTHRUSTcxx . . $ `scripts/osiris_common.h:826:9`!: |
| 797 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 798 | if (!objp || (objp->movement_typecxx . . $ object#movement_type. != MT_WALKINGcxx . . $ `Descent3/object_external.h:235:9`! && objp->movement_typecxx . . $ object#movement_type. != MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!)) |
| 799 | mstruct->rot_thrustcxx . . $ msafe_struct#rot_thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 800 | else |
| 801 | mstruct->rot_thrustcxx . . $ msafe_struct#rot_thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust.; |
| 802 | break; |
| 803 | case MSAFE_OBJECT_FLAGScxx . . $ `scripts/osiris_common.h:827:9`!: // Needs to be send |
| 804 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 805 | if (!objp) |
| 806 | mstruct->flagscxx . . $ msafe_struct#flags. = 0; |
| 807 | else |
| 808 | mstruct->flagscxx . . $ msafe_struct#flags. = objp->flagscxx . . $ object#flags.; |
| 809 | break; |
| 810 | case MSAFE_OBJECT_SIZEcxx . . $ `scripts/osiris_common.h:828:9`!: |
| 811 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 812 | if (!objp) |
| 813 | mstruct->sizecxx . . $ msafe_struct#size. = 0.0f; |
| 814 | else |
| 815 | mstruct->sizecxx . . $ msafe_struct#size. = objp->sizecxx . . $ object#size.; |
| 816 | break; |
| 817 | case MSAFE_OBJECT_CONTROL_TYPEcxx . . $ `scripts/osiris_common.h:829:9`!: // Needs to be send |
| 818 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 819 | if (!objp) |
| 820 | mstruct->control_typecxx . . $ msafe_struct#control_type. = CT_NONEcxx . . $ `Descent3/object_external.h:216:9`!; |
| 821 | else |
| 822 | mstruct->control_typecxx . . $ msafe_struct#control_type. = objp->control_typecxx . . $ object#control_type.; |
| 823 | break; |
| 824 | case MSAFE_OBJECT_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:830:9`!: // Needs to be send |
| 825 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 826 | if (!objp) |
| 827 | mstruct->movement_typecxx . . $ msafe_struct#movement_type. = MT_NONEcxx . . $ `Descent3/object_external.h:233:9`!; |
| 828 | else |
| 829 | mstruct->movement_typecxx . . $ msafe_struct#movement_type. = objp->movement_typecxx . . $ object#movement_type.; |
| 830 | break; |
| 831 | case MSAFE_OBJECT_CREATION_TIMEcxx . . $ `scripts/osiris_common.h:831:9`!: |
| 832 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 833 | if (!objp) |
| 834 | mstruct->creation_timecxx . . $ msafe_struct#creation_time. = 0.0f; |
| 835 | else |
| 836 | mstruct->creation_timecxx . . $ msafe_struct#creation_time. = objp->creation_timecxx . . $ object#creation_time.; |
| 837 | break; |
| 838 | case MSAFE_OBJECT_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:833:9`!: // Needs to be send |
| 839 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 840 | if (!objp || (objp->movement_typecxx . . $ object#movement_type. != MT_WALKINGcxx . . $ `Descent3/object_external.h:235:9`! && objp->movement_typecxx . . $ object#movement_type. != MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!)) |
| 841 | mstruct->physics_flagscxx . . $ msafe_struct#physics_flags. = 0; |
| 842 | else |
| 843 | mstruct->physics_flagscxx . . $ msafe_struct#physics_flags. = objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags.; |
| 844 | break; |
| 845 | case MSAFE_OBJECT_ROTDRAGcxx . . $ `scripts/osiris_common.h:835:9`!: |
| 846 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 847 | if (!objp || (objp->movement_typecxx . . $ object#movement_type. != MT_WALKINGcxx . . $ `Descent3/object_external.h:235:9`! && objp->movement_typecxx . . $ object#movement_type. != MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!)) |
| 848 | mstruct->rot_dragcxx . . $ msafe_struct#rot_drag. = 1.0f; |
| 849 | else |
| 850 | mstruct->rot_dragcxx . . $ msafe_struct#rot_drag. = objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotdragcxx . . $ physics_info#rotdrag.; |
| 851 | break; |
| 852 | case MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!: |
| 853 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 854 | if (!objp) |
| 855 | mstruct->shieldscxx . . $ msafe_struct#shields. = -1; |
| 856 | else |
| 857 | mstruct->shieldscxx . . $ msafe_struct#shields. = objp->shieldscxx . . $ object#shields.; |
| 858 | break; |
| 859 | case MSAFE_OBJECT_SHIELDS_ORIGINALcxx . . $ `scripts/osiris_common.h:855:9`!: |
| 860 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 861 | if (!objp || !IS_GENERICcxx . . $ `Descent3/object_external.h:190:9`!(objp->type)) |
| 862 | mstruct->shieldscxx . . $ msafe_struct#shields. = -1; |
| 863 | else |
| 864 | mstruct->shieldscxx . . $ msafe_struct#shields. = Object_infocxx . . $ Object_info.[objp->idcxx . . $ object#id.].hit_pointscxx . . $ object_info#hit_points.; |
| 865 | break; |
| 866 | case MSAFE_OBJECT_ENERGYcxx . . $ `scripts/osiris_common.h:803:9`!: |
| 867 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 868 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.) || (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) |
| 869 | mstruct->energycxx . . $ msafe_struct#energy. = 0; |
| 870 | else |
| 871 | mstruct->energycxx . . $ msafe_struct#energy. = Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].energycxx . . $ player#energy.; |
| 872 | break; |
| 873 | case MSAFE_OBJECT_MOVEMENT_SCALARcxx . . $ `scripts/osiris_common.h:806:9`!: |
| 874 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.) || (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) |
| 875 | mstruct->scalarcxx . . $ msafe_struct#scalar. = 0.0; |
| 876 | else |
| 877 | mstruct->scalarcxx . . $ msafe_struct#scalar. = Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].movement_scalarcxx . . $ player#movement_scalar.; |
| 878 | break; |
| 879 | case MSAFE_OBJECT_RECHARGE_SCALARcxx . . $ `scripts/osiris_common.h:807:9`!: |
| 880 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.) || (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) |
| 881 | mstruct->scalarcxx . . $ msafe_struct#scalar. = 0.0; |
| 882 | else |
| 883 | mstruct->scalarcxx . . $ msafe_struct#scalar. = Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].weapon_recharge_scalarcxx . . $ player#weapon_recharge_scalar.; |
| 884 | break; |
| 885 | case MSAFE_OBJECT_WSPEED_SCALARcxx . . $ `scripts/osiris_common.h:808:9`!: |
| 886 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.) || (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) |
| 887 | mstruct->scalarcxx . . $ msafe_struct#scalar. = 0.0; |
| 888 | else |
| 889 | mstruct->scalarcxx . . $ msafe_struct#scalar. = Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].weapon_speed_scalarcxx . . $ player#weapon_speed_scalar.; |
| 890 | break; |
| 891 | case MSAFE_OBJECT_ARMOR_SCALARcxx . . $ `scripts/osiris_common.h:810:9`!: |
| 892 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.) || (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) |
| 893 | mstruct->scalarcxx . . $ msafe_struct#scalar. = 0.0; |
| 894 | else |
| 895 | mstruct->scalarcxx . . $ msafe_struct#scalar. = Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].armor_scalarcxx . . $ player#armor_scalar.; |
| 896 | break; |
| 897 | case MSAFE_OBJECT_DAMAGE_SCALARcxx . . $ `scripts/osiris_common.h:809:9`!: |
| 898 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.) || (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. != OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) |
| 899 | mstruct->scalarcxx . . $ msafe_struct#scalar. = 0.0; |
| 900 | else |
| 901 | mstruct->scalarcxx . . $ msafe_struct#scalar. = Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].damage_scalarcxx . . $ player#damage_scalar.; |
| 902 | break; |
| 903 | case MSAFE_OBJECT_TYPEcxx . . $ `scripts/osiris_common.h:812:9`!: |
| 904 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 905 | if (!objp) |
| 906 | mstruct->typecxx . . $ msafe_struct#type. = -1; |
| 907 | else |
| 908 | mstruct->typecxx . . $ msafe_struct#type. = objp->typecxx . . $ object#type.; |
| 909 | break; |
| 910 | case MSAFE_OBJECT_IDcxx . . $ `scripts/osiris_common.h:813:9`!: |
| 911 | objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 912 | if (!objp) |
| 913 | mstruct->idcxx . . $ msafe_struct#id. = -1; |
| 914 | else |
| 915 | mstruct->idcxx . . $ msafe_struct#id. = objp->idcxx . . $ object#id.; |
| 916 | break; |
| 917 | case MSAFE_OBJECT_PARENTcxx . . $ `scripts/osiris_common.h:834:9`!: { |
| 918 | objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 919 | if (!obj) |
| 920 | return; |
| 921 | obj = ObjGetUltimateParentcxx . . $ ObjGetUltimateParent(64a00b84ed3f82ee).(obj); |
| 922 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = obj->handlecxx . . $ object#handle.; |
| 923 | break; |
| 924 | } |
| 925 | case MSAFE_OBJECT_ENERGY_WEAPONcxx . . $ `scripts/osiris_common.h:853:9`!: { |
| 926 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 927 | mstruct->statecxx . . $ msafe_struct#state. = (objp && (objp->typecxx . . $ object#type. == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) && !(Weaponscxx . . $ Weapons.[objp->idcxx . . $ object#id.].flagscxx . . $ weapon#flags. & WF_MATTER_WEAPONcxx . . $ `Descent3/weapon.h:221:9`!)); |
| 928 | } |
| 929 | case MSAFE_OBJECT_DAMAGE_AMOUNTcxx . . $ `scripts/osiris_common.h:854:9`!: { |
| 930 | mstruct->amountcxx . . $ msafe_struct#amount. = 0; // default |
| 931 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 932 | if (!objp || (objp->typecxx . . $ object#type. != OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!)) |
| 933 | return; |
| 934 | mstruct->amountcxx . . $ msafe_struct#amount. = Weaponscxx . . $ Weapons.[objp->idcxx . . $ object#id.].generic_damagecxx . . $ weapon#generic_damage. * objp->ctypecxx . . $ object#ctype..laser_infocxx . . $ object#$anonymous_type_9#laser_info..multipliercxx . . $ laser_info_s#multiplier.; |
| 935 | break; |
| 936 | } |
| 937 | case MSAFE_OBJECT_COUNT_TYPEcxx . . $ `scripts/osiris_common.h:847:9`!: { |
| 938 | int i, count = 0; |
| 939 | for (i = 0, objp = Objectscxx . . $ Objects.; i <= Highest_object_indexcxx . . $ Highest_object_index.; i++, objp++) { |
| 940 | if ((objp->typecxx . . $ object#type. == mstruct->typecxx . . $ msafe_struct#type.) && (objp->idcxx . . $ object#id. == mstruct->idcxx . . $ msafe_struct#id.)) |
| 941 | count++; |
| 942 | } |
| 943 | mstruct->countcxx . . $ msafe_struct#count. = count; |
| 944 | break; |
| 945 | } |
| 946 | // case MSAFE_OBJECT_ANIM_FRAME: |
| 947 | // { |
| 948 | // objp = ObjGet(mstruct->objhandle); |
| 949 | // if(!objp || !(objp->flags & OF_POLYGON_OBJECT)) |
| 950 | // mstruct->anim_frame = 0.0f; |
| 951 | // else |
| 952 | // mstruct->anim_frame = objp->rtype.pobj_info.anim_frame; |
| 953 | // break; |
| 954 | // } |
| 955 | case MSAFE_OBJECT_INVULNERABLEcxx . . $ `scripts/osiris_common.h:836:9`!: { |
| 956 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) { |
| 957 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 958 | mstruct->lifetimecxx . . $ msafe_struct#lifetime. = 0; |
| 959 | return; |
| 960 | } |
| 961 | |
| 962 | if (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 963 | mstruct->statecxx . . $ msafe_struct#state. = (bool)((Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].flagscxx . . $ player#flags. & PLAYER_FLAGS_INVULNERABLEcxx . . $ `Descent3/player_external.h:79:9`!) != 0); |
| 964 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 965 | mstruct->lifetimecxx . . $ msafe_struct#lifetime. = Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].invulnerable_timecxx . . $ player#invulnerable_time.; |
| 966 | else |
| 967 | mstruct->lifetimecxx . . $ msafe_struct#lifetime. = 0; |
| 968 | } else { |
| 969 | mstruct->statecxx . . $ msafe_struct#state. = (bool)((MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->flagscxx . . $ object#flags. & OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!) == 0); |
| 970 | mstruct->lifetimecxx . . $ msafe_struct#lifetime. = 0; |
| 971 | } |
| 972 | |
| 973 | break; |
| 974 | } |
| 975 | case MSAFE_OBJECT_CLOAKcxx . . $ `scripts/osiris_common.h:837:9`!: { |
| 976 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) { |
| 977 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 978 | mstruct->lifetimecxx . . $ msafe_struct#lifetime. = 0; |
| 979 | return; |
| 980 | } |
| 981 | if (!MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->effect_infocxx . . $ object#effect_info.) { |
| 982 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 983 | mstruct->lifetimecxx . . $ msafe_struct#lifetime. = 0; |
| 984 | return; |
| 985 | } |
| 986 | mstruct->statecxx . . $ msafe_struct#state. = (bool)((MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. & EF_CLOAKEDcxx . . $ `Descent3/object_external.h:197:9`!) != 0); |
| 987 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 988 | mstruct->lifetimecxx . . $ msafe_struct#lifetime. = MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->effect_infocxx . . $ object#effect_info.->cloak_timecxx . . $ effect_info_s#cloak_time.; |
| 989 | else |
| 990 | mstruct->lifetimecxx . . $ msafe_struct#lifetime. = 0; |
| 991 | break; |
| 992 | } |
| 993 | case MSAFE_OBJECT_LIGHT_DISTcxx . . $ `scripts/osiris_common.h:841:9`!: { |
| 994 | mstruct->light_distancecxx . . $ msafe_struct#light_distance. = 0.0; // default |
| 995 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 996 | if (objp) { |
| 997 | light_infocxx . . $ light_info# *li = ObjGetLightInfocxx . . $ ObjGetLightInfo(fae61030adf16a8b).(objp); |
| 998 | if (li) |
| 999 | mstruct->light_distancecxx . . $ msafe_struct#light_distance. = li->light_distancecxx . . $ light_info#light_distance.; |
| 1000 | } |
| 1001 | break; |
| 1002 | } |
| 1003 | case MSAFE_OBJECT_PLAYER_HANDLEcxx . . $ `scripts/osiris_common.h:838:9`!: |
| 1004 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; // default to none |
| 1005 | if ((mstruct->slotcxx . . $ msafe_struct#slot. >= 0) && (mstruct->slotcxx . . $ msafe_struct#slot. < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!) && (Playerscxx . . $ Players.[mstruct->slotcxx . . $ msafe_struct#slot.].objnumcxx . . $ player#objnum. != -1)) { |
| 1006 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 1007 | // Don't return the handle for observers |
| 1008 | if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[mstruct->slotcxx . . $ msafe_struct#slot.].objnumcxx . . $ player#objnum.].typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!) |
| 1009 | break; |
| 1010 | |
| 1011 | if (NetPlayerscxx . . $ NetPlayers.[mstruct->slotcxx . . $ msafe_struct#slot.].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[mstruct->slotcxx . . $ msafe_struct#slot.].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) |
| 1012 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[mstruct->slotcxx . . $ msafe_struct#slot.].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 1013 | } else { |
| 1014 | if (mstruct->slotcxx . . $ msafe_struct#slot. == 0) |
| 1015 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[mstruct->slotcxx . . $ msafe_struct#slot.].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 1016 | } |
| 1017 | } |
| 1018 | break; |
| 1019 | case MSAFE_OBJECT_PLAYER_CONTROLAIcxx . . $ `scripts/osiris_common.h:845:9`!: { |
| 1020 | bool ok = false; |
| 1021 | mstruct->statecxx . . $ msafe_struct#state. = false; |
| 1022 | if ((mstruct->slotcxx . . $ msafe_struct#slot. >= 0) && (mstruct->slotcxx . . $ msafe_struct#slot. < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!) && (Playerscxx . . $ Players.[mstruct->slotcxx . . $ msafe_struct#slot.].objnumcxx . . $ player#objnum. != -1)) { |
| 1023 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 1024 | if (NetPlayerscxx . . $ NetPlayers.[mstruct->slotcxx . . $ msafe_struct#slot.].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[mstruct->slotcxx . . $ msafe_struct#slot.].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) |
| 1025 | ok = true; |
| 1026 | } else { |
| 1027 | if (mstruct->slotcxx . . $ msafe_struct#slot. == 0) |
| 1028 | ok = true; |
| 1029 | } |
| 1030 | } |
| 1031 | if (ok) { |
| 1032 | if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[mstruct->slotcxx . . $ msafe_struct#slot.].objnumcxx . . $ player#objnum.].control_typecxx . . $ object#control_type. == CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) |
| 1033 | mstruct->statecxx . . $ msafe_struct#state. = true; |
| 1034 | else |
| 1035 | mstruct->statecxx . . $ msafe_struct#state. = false; |
| 1036 | } |
| 1037 | } break; |
| 1038 | case MSAFE_DOOR_LOCK_STATEcxx . . $ `scripts/osiris_common.h:873:9`!: |
| 1039 | mstruct->statecxx . . $ msafe_struct#state. = DoorwayLockedcxx . . $ DoorwayLocked(83c267b20bac841a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1040 | break; |
| 1041 | case MSAFE_DOOR_OPENABLEcxx . . $ `scripts/osiris_common.h:877:9`!: |
| 1042 | mstruct->statecxx . . $ msafe_struct#state. = DoorwayOpenablecxx . . $ DoorwayOpenable(cf9ef193275fa6d8).(mstruct->objhandlecxx . . $ msafe_struct#objhandle., mstruct->ithandlecxx . . $ msafe_struct#ithandle.); |
| 1043 | break; |
| 1044 | case MSAFE_DOOR_POSITIONcxx . . $ `scripts/osiris_common.h:875:9`!: |
| 1045 | mstruct->scalarcxx . . $ msafe_struct#scalar. = DoorwayGetPositioncxx . . $ `Descent3/doorway.h:215:9`!(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1046 | break; |
| 1047 | case MSAFE_TRIGGER_SETcxx . . $ `scripts/osiris_common.h:879:9`!: |
| 1048 | // Returns 1 if the trigger is enabled |
| 1049 | mstruct->statecxx . . $ msafe_struct#state. = TriggerGetStatecxx . . $ TriggerGetState(83c267b20bac841a).(mstruct->trigger_numcxx . . $ msafe_struct#trigger_num.); |
| 1050 | break; |
| 1051 | case MSAFE_ROOM_HAS_PLAYERcxx . . $ `scripts/osiris_common.h:797:9`!: { |
| 1052 | int objnum; |
| 1053 | |
| 1054 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) { |
| 1055 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 1056 | break; |
| 1057 | } |
| 1058 | for (objnum = Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].objectscxx . . $ room#objects.; objnum != -1; objnum = Objectscxx . . $ Objects.[objnum].nextcxx . . $ object#next.) { |
| 1059 | if (Objectscxx . . $ Objects.[objnum].typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) |
| 1060 | break; |
| 1061 | } |
| 1062 | mstruct->statecxx . . $ msafe_struct#state. = (objnum != -1); |
| 1063 | break; |
| 1064 | } |
| 1065 | case MSAFE_ROOM_PORTAL_RENDERcxx . . $ `scripts/osiris_common.h:789:9`!: { |
| 1066 | if (!VALIDATE_ROOM_PORTALcxx . . $ VALIDATE_ROOM_PORTAL(cf9ef193275fa6d8).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., mstruct->portalnumcxx . . $ msafe_struct#portalnum.)) { |
| 1067 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 1068 | break; |
| 1069 | } |
| 1070 | |
| 1071 | portalcxx . . $ portal# *pp = &Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].portalscxx . . $ room#portals.[mstruct->portalnumcxx . . $ msafe_struct#portalnum.]; |
| 1072 | |
| 1073 | if (pp->flagscxx . . $ portal#flags. & PF_RENDER_FACEScxx . . $ `Descent3/room_external.h:155:9`!) |
| 1074 | mstruct->statecxx . . $ msafe_struct#state. = 1; |
| 1075 | else |
| 1076 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 1077 | break; |
| 1078 | } |
| 1079 | case MSAFE_ROOM_PORTAL_BLOCKcxx . . $ `scripts/osiris_common.h:799:9`!: { |
| 1080 | if (!VALIDATE_ROOM_PORTALcxx . . $ VALIDATE_ROOM_PORTAL(cf9ef193275fa6d8).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., mstruct->portalnumcxx . . $ msafe_struct#portalnum.)) { |
| 1081 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 1082 | break; |
| 1083 | } |
| 1084 | |
| 1085 | portalcxx . . $ portal# *pp = &Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].portalscxx . . $ room#portals.[mstruct->portalnumcxx . . $ msafe_struct#portalnum.]; |
| 1086 | if (pp->flagscxx . . $ portal#flags. & PF_BLOCKcxx . . $ `Descent3/room_external.h:160:9`!) |
| 1087 | mstruct->statecxx . . $ msafe_struct#state. = 1; |
| 1088 | else |
| 1089 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 1090 | break; |
| 1091 | } |
| 1092 | case MSAFE_ROOM_DAMAGEcxx . . $ `scripts/osiris_common.h:793:9`!: |
| 1093 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) { |
| 1094 | mstruct->amountcxx . . $ msafe_struct#amount. = 0.0; |
| 1095 | mstruct->indexcxx . . $ msafe_struct#index. = 0; |
| 1096 | break; |
| 1097 | } |
| 1098 | mstruct->amountcxx . . $ msafe_struct#amount. = Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].damagecxx . . $ room#damage.; |
| 1099 | mstruct->indexcxx . . $ msafe_struct#index. = Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].damage_typecxx . . $ room#damage_type.; |
| 1100 | break; |
| 1101 | case MSAFE_MISC_ENABLE_SHIPcxx . . $ `scripts/osiris_common.h:888:9`!: { |
| 1102 | mstruct->statecxx . . $ msafe_struct#state. = PlayerIsShipAllowedcxx . . $ PlayerIsShipAllowed(ceb9eed3194142b2).(-1, mstruct->namecxx . . $ msafe_struct#name.); |
| 1103 | } break; |
| 1104 | case MSAFE_MISC_WAYPOINTcxx . . $ `scripts/osiris_common.h:882:9`!: |
| 1105 | mstruct->indexcxx . . $ msafe_struct#index. = Current_waypointcxx . . $ Current_waypoint.; |
| 1106 | break; |
| 1107 | case MSAFE_MISC_GUIDEBOT_NAMEcxx . . $ `scripts/osiris_common.h:890:9`!: { |
| 1108 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1109 | if (objp && objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! && objp->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) { |
| 1110 | Current_pilotcxx . . $ Current_pilot..get_guidebot_namecxx . . $ pilot#get_guidebot_name(fda57c8427c60377).(mstruct->namecxx . . $ msafe_struct#name.); |
| 1111 | } else { |
| 1112 | strcpy(mstruct->namecxx . . $ msafe_struct#name., "GB"); |
| 1113 | } |
| 1114 | } break; |
| 1115 | case MSAFE_INVEN_CHECKcxx . . $ `scripts/osiris_common.h:897:9`!: |
| 1116 | case MSAFE_COUNTERMEASURE_CHECKcxx . . $ `scripts/osiris_common.h:908:9`!: { |
| 1117 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1118 | int ret; |
| 1119 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1120 | int slot = objp->idcxx . . $ object#id.; |
| 1121 | if (type == MSAFE_COUNTERMEASURE_CHECKcxx . . $ `scripts/osiris_common.h:908:9`!) |
| 1122 | mstruct->typecxx . . $ msafe_struct#type. = OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!; |
| 1123 | if (mstruct->typecxx . . $ msafe_struct#type. == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 1124 | ret = Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..CheckItemcxx . . $ Inventory#CheckItem(cf9ef193275fa6d8).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id.); |
| 1125 | else |
| 1126 | ret = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..CheckItemcxx . . $ Inventory#CheckItem(cf9ef193275fa6d8).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id.); |
| 1127 | if (ret) |
| 1128 | mstruct->statecxx . . $ msafe_struct#state. = 1; |
| 1129 | else |
| 1130 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 1131 | } |
| 1132 | break; |
| 1133 | } |
| 1134 | case MSAFE_INVEN_COUNTcxx . . $ `scripts/osiris_common.h:898:9`!: { |
| 1135 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1136 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1137 | int slot = objp->idcxx . . $ object#id.; |
| 1138 | mstruct->countcxx . . $ msafe_struct#count. = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id.); |
| 1139 | } |
| 1140 | break; |
| 1141 | } |
| 1142 | case MSAFE_INVEN_SIZEcxx . . $ `scripts/osiris_common.h:900:9`!: { |
| 1143 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1144 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1145 | int slot = objp->idcxx . . $ object#id.; |
| 1146 | mstruct->sizecxx . . $ msafe_struct#size. = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Sizecxx . . $ Inventory#Size(b126dc7c1de90089).(); |
| 1147 | } |
| 1148 | } break; |
| 1149 | case MSAFE_INVEN_GET_TYPE_IDcxx . . $ `scripts/osiris_common.h:901:9`!: { |
| 1150 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1151 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1152 | int slot = objp->idcxx . . $ object#id.; |
| 1153 | int size = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Sizecxx . . $ Inventory#Size(b126dc7c1de90089).(); |
| 1154 | if (mstruct->indexcxx . . $ msafe_struct#index. < 0 || mstruct->indexcxx . . $ msafe_struct#index. > size) { |
| 1155 | mstruct->countcxx . . $ msafe_struct#count. = 0; |
| 1156 | mstruct->typecxx . . $ msafe_struct#type. = OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!; |
| 1157 | mstruct->idcxx . . $ msafe_struct#id. = 0; |
| 1158 | return; |
| 1159 | } |
| 1160 | int savepos = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..GetPoscxx . . $ Inventory#GetPos(b126dc7c1de90089).(); |
| 1161 | Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..GotoPoscxx . . $ Inventory#GotoPos(d4f767463ce0a6b3).(mstruct->indexcxx . . $ msafe_struct#index.); |
| 1162 | mstruct->countcxx . . $ msafe_struct#count. = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..GetPosCountcxx . . $ Inventory#GetPosCount(b126dc7c1de90089).(); |
| 1163 | Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..GetPosTypeIDcxx . . $ Inventory#GetPosTypeID(8a990ad1ed500b42).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id.); |
| 1164 | |
| 1165 | Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..GotoPoscxx . . $ Inventory#GotoPos(d4f767463ce0a6b3).(savepos); |
| 1166 | } |
| 1167 | } break; |
| 1168 | case MSAFE_INVEN_CHECK_OBJECTcxx . . $ `scripts/osiris_common.h:903:9`!: { |
| 1169 | objectcxx . . $ object# *player = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1170 | objectcxx . . $ object# *object = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->ithandlecxx . . $ msafe_struct#ithandle.); |
| 1171 | mstruct->statecxx . . $ msafe_struct#state. = false; |
| 1172 | if (player && object && (player->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1173 | int slot = player->idcxx . . $ object#id.; |
| 1174 | mstruct->statecxx . . $ msafe_struct#state. = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..CheckItemcxx . . $ Inventory#CheckItem(cf9ef193275fa6d8).(mstruct->ithandlecxx . . $ msafe_struct#ithandle., -1); |
| 1175 | } |
| 1176 | } break; |
| 1177 | case MSAFE_COUNTERMEASURE_COUNTcxx . . $ `scripts/osiris_common.h:907:9`!: { |
| 1178 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1179 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1180 | int slot = objp->idcxx . . $ object#id.; |
| 1181 | int id = FindWeaponNamecxx . . $ FindWeaponName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(mstruct->name)); |
| 1182 | if (id == -1) { |
| 1183 | mstruct->countcxx . . $ msafe_struct#count. = 0; |
| 1184 | } else { |
| 1185 | mstruct->countcxx . . $ msafe_struct#count. = Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, id); |
| 1186 | } |
| 1187 | } |
| 1188 | } break; |
| 1189 | case MSAFE_COUNTERMEASURE_SIZEcxx . . $ `scripts/osiris_common.h:910:9`!: { |
| 1190 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1191 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1192 | int slot = objp->idcxx . . $ object#id.; |
| 1193 | mstruct->sizecxx . . $ msafe_struct#size. = Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..Sizecxx . . $ Inventory#Size(b126dc7c1de90089).(); |
| 1194 | } |
| 1195 | } break; |
| 1196 | case MSAFE_COUNTERMEASURE_GETcxx . . $ `scripts/osiris_common.h:911:9`!: { |
| 1197 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1198 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1199 | int slot = objp->idcxx . . $ object#id.; |
| 1200 | int size = Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..Sizecxx . . $ Inventory#Size(b126dc7c1de90089).(); |
| 1201 | if (mstruct->indexcxx . . $ msafe_struct#index. < 0 || mstruct->indexcxx . . $ msafe_struct#index. > size) { |
| 1202 | mstruct->countcxx . . $ msafe_struct#count. = 0; |
| 1203 | mstruct->typecxx . . $ msafe_struct#type. = OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!; |
| 1204 | mstruct->idcxx . . $ msafe_struct#id. = 0; |
| 1205 | return; |
| 1206 | } |
| 1207 | int savepos = Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..GetPoscxx . . $ Inventory#GetPos(b126dc7c1de90089).(); |
| 1208 | Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..GotoPoscxx . . $ Inventory#GotoPos(d4f767463ce0a6b3).(mstruct->indexcxx . . $ msafe_struct#index.); |
| 1209 | mstruct->countcxx . . $ msafe_struct#count. = Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..GetPosCountcxx . . $ Inventory#GetPosCount(b126dc7c1de90089).(); |
| 1210 | Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..GetPosTypeIDcxx . . $ Inventory#GetPosTypeID(8a990ad1ed500b42).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id.); |
| 1211 | Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..GotoPoscxx . . $ Inventory#GotoPos(d4f767463ce0a6b3).(savepos); |
| 1212 | } |
| 1213 | } break; |
| 1214 | case MSAFE_ROOM_FOG_STATEcxx . . $ `scripts/osiris_common.h:790:9`!: |
| 1215 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1216 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 1217 | else |
| 1218 | mstruct->statecxx . . $ msafe_struct#state. = (Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. & RF_FOGcxx . . $ `Descent3/room_external.h:184:9`!) != 0; |
| 1219 | break; |
| 1220 | case MSAFE_WEAPON_CHECKcxx . . $ `scripts/osiris_common.h:913:9`!: { |
| 1221 | // we want to check a player for a particular weapon |
| 1222 | // objhandle: the player |
| 1223 | // index: the weapon |
| 1224 | // state: whether the player has the weapon |
| 1225 | // count: ammo (if it's an ammo/secondary) of the weapon, else -1 |
| 1226 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1227 | mstruct->statecxx . . $ msafe_struct#state. = 0; |
| 1228 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(mstruct->index >= 0 && mstruct->index < MAX_PRIMARY_WEAPONScxx . . $ `Descent3/weapon.h:202:9`! + MAX_SECONDARY_WEAPONScxx . . $ `Descent3/weapon.h:203:9`!); |
| 1229 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1230 | int pnum = objp->idcxx . . $ object#id.; |
| 1231 | if (Playerscxx . . $ Players.[pnum].weapon_flagscxx . . $ player#weapon_flags. & HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(mstruct->index)) { |
| 1232 | mstruct->statecxx . . $ msafe_struct#state. = 1; |
| 1233 | if (mstruct->indexcxx . . $ msafe_struct#index. >= SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) { |
| 1234 | mstruct->countcxx . . $ msafe_struct#count. = Playerscxx . . $ Players.[pnum].weapon_ammocxx . . $ player#weapon_ammo.[mstruct->indexcxx . . $ msafe_struct#index.]; |
| 1235 | } else { |
| 1236 | shipcxx . . $ ship# *ship = &Shipscxx . . $ Ships.[Playerscxx . . $ Players.[pnum].ship_indexcxx . . $ player#ship_index.]; |
| 1237 | otype_wb_infocxx . . $ otype_wb_info# *wb = &ship->static_wbcxx . . $ ship#static_wb.[mstruct->indexcxx . . $ msafe_struct#index.]; |
| 1238 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(wb != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1239 | if (wb->ammo_usagecxx . . $ otype_wb_info#ammo_usage.) { |
| 1240 | // this guy is an ammo weapon! |
| 1241 | mstruct->countcxx . . $ msafe_struct#count. = Playerscxx . . $ Players.[pnum].weapon_ammocxx . . $ player#weapon_ammo.[mstruct->indexcxx . . $ msafe_struct#index.]; |
| 1242 | } else { |
| 1243 | // no ammo |
| 1244 | mstruct->countcxx . . $ msafe_struct#count. = -1; |
| 1245 | } |
| 1246 | } |
| 1247 | } |
| 1248 | } else { |
| 1249 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // uhhhh |
| 1250 | } |
| 1251 | } break; |
| 1252 | case MSAFE_WEAPON_ADDcxx . . $ `scripts/osiris_common.h:914:9`!: |
| 1253 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // huh? |
| 1254 | break; |
| 1255 | default: |
| 1256 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // Invalid type passed to function |
| 1257 | break; |
| 1258 | } |
| 1259 | } |
| 1260 | // Gets the player slot from the specified object, if the object is a player or player weapon |
| 1261 | // Returns -1 if can't find player |
| 1262 | int GetPlayerSlotcxx . . $ GetPlayerSlot(7864480464b09eea).(int objhandle) { |
| 1263 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(objhandle); |
| 1264 | if (!objp) |
| 1265 | return -1; |
| 1266 | if (objp->typecxx . . $ object#type. == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 1267 | objp = ObjGetUltimateParentcxx . . $ ObjGetUltimateParent(64a00b84ed3f82ee).(objp); |
| 1268 | if (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) |
| 1269 | return objp->idcxx . . $ object#id.; |
| 1270 | else |
| 1271 | return -1; |
| 1272 | } |
| 1273 | #define GB_TOKENcxx . . $ `Descent3/multisafe.cpp:1273:9`! "GUIDEBOT:" |
| 1274 | // If the src message is from the guidebot, xlates it into the proper format. If not a GB |
| 1275 | // message, just copies the string over. |
| 1276 | // Returns true if is a GB message |
| 1277 | bool XlateGBMessagecxx . . $ XlateGBMessage(14223ed414283e68).(char *dest, char *src) { |
| 1278 | if (strnicmpcxx . . $ `linux/linux_fix.h:44:9`!(src, GB_TOKENcxx . . $ `Descent3/multisafe.cpp:1273:9`!, sizeof(GB_TOKENcxx . . $ `Descent3/multisafe.cpp:1273:9`!) - 1) != 0) { |
| 1279 | strcpy(dest, src); |
| 1280 | return 0; |
| 1281 | } |
| 1282 | char *t = src + strlen(GB_TOKENcxx . . $ `Descent3/multisafe.cpp:1273:9`!); // skip the first part of the string |
| 1283 | while (*t == ' ') // skip spaces |
| 1284 | t++; |
| 1285 | if (*t == '"') // skip the leading quote |
| 1286 | t++; |
| 1287 | char gbname[100]; |
| 1288 | Current_pilotcxx . . $ Current_pilot..get_guidebot_namecxx . . $ pilot#get_guidebot_name(fda57c8427c60377).(gbname); |
| 1289 | sprintf(dest, "\1\255\255\1%s:\1\1\255\1 %s", gbname, t); |
| 1290 | while (dest[strlen(dest) - 1] == ' ') // strip spaces at end |
| 1291 | dest[strlen(dest) - 1] = 0; |
| 1292 | if (dest[strlen(dest) - 1] == '"') // Remove the trailing quote |
| 1293 | dest[strlen(dest) - 1] = 0; |
| 1294 | return 1; |
| 1295 | } |
| 1296 | char Custom_HUD_textcxx . . $ Custom_HUD_text.[MSAFE_MESSAGE_LENGTHcxx . . $ `scripts/osiris_common.h:1219:9`!] = ""; |
| 1297 | extern bool Demo_call_okcxx . . $ Demo_call_ok.; |
| 1298 | // The main entry point for all the multisafe functions |
| 1299 | // Pass the type of function you want, and then fill in the relevant fields |
| 1300 | // of the mstruct |
| 1301 | void msafe_CallFunctioncxx . . $ msafe_CallFunction(6cc1e8e00715904d).(uint8_tcxx . . $ uint8_t# type, msafe_structcxx . . $ msafe_struct# *mstruct) { |
| 1302 | if ((Demo_flagscxx . . $ Demo_flags. == DF_PLAYBACKcxx . . $ `lib/demofile.h:123:9`!) && (!Demo_call_okcxx . . $ Demo_call_ok.)) |
| 1303 | return; |
| 1304 | uint8_tcxx . . $ uint8_t# send_it = 1; |
| 1305 | switch (type) { |
| 1306 | case MSAFE_WEATHER_RAINcxx . . $ `scripts/osiris_common.h:860:9`!: |
| 1307 | SetRainStatecxx . . $ SetRainState(43c79ee2f1b9aefe).(mstruct->statecxx . . $ msafe_struct#state., mstruct->scalarcxx . . $ msafe_struct#scalar.); |
| 1308 | break; |
| 1309 | case MSAFE_WEATHER_SNOWcxx . . $ `scripts/osiris_common.h:861:9`!: |
| 1310 | SetSnowStatecxx . . $ SetSnowState(43c79ee2f1b9aefe).(mstruct->statecxx . . $ msafe_struct#state., mstruct->scalarcxx . . $ msafe_struct#scalar.); |
| 1311 | break; |
| 1312 | case MSAFE_WEATHER_LIGHTNINGcxx . . $ `scripts/osiris_common.h:862:9`!: |
| 1313 | SetLightningStatecxx . . $ SetLightningState(d6d7ce2c0b3115db).(mstruct->statecxx . . $ msafe_struct#state., mstruct->scalarcxx . . $ msafe_struct#scalar., mstruct->randvalcxx . . $ msafe_struct#randval.); |
| 1314 | break; |
| 1315 | case MSAFE_WEATHER_LIGHTNING_BOLTcxx . . $ `scripts/osiris_common.h:863:9`!: { |
| 1316 | if (mstruct->texnumcxx . . $ msafe_struct#texnum. == -1) { |
| 1317 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Failing bolt because texnum is -1\n"); |
| 1318 | return; |
| 1319 | } |
| 1320 | |
| 1321 | if (mstruct->flagscxx . . $ msafe_struct#flags.) { |
| 1322 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1323 | return; |
| 1324 | } else { |
| 1325 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1326 | return; |
| 1327 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->ithandlecxx . . $ msafe_struct#ithandle.)) |
| 1328 | return; |
| 1329 | } |
| 1330 | int visnum = VisEffectCreatecxx . . $ VisEffectCreate(20e4831b18f6895c).(VIS_FIREBALLcxx . . $ `Descent3/viseffect_external.h:61:9`!, THICK_LIGHTNING_INDEXcxx . . $ `Descent3/fireball_external.h:62:9`!, mstruct->roomnumcxx . . $ msafe_struct#roomnum., &mstruct->poscxx . . $ msafe_struct#pos.); |
| 1331 | if (visnum >= 0) { |
| 1332 | vis_effectcxx . . $ vis_effect# *vis = &VisEffectscxx . . $ VisEffects.[visnum]; |
| 1333 | vis->lifeleftcxx . . $ vis_effect#lifeleft. = mstruct->lifetimecxx . . $ msafe_struct#lifetime.; |
| 1334 | vis->lifetimecxx . . $ vis_effect#lifetime. = mstruct->lifetimecxx . . $ msafe_struct#lifetime.; |
| 1335 | vis->end_poscxx . . $ vis_effect#end_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). mstruct->pos2cxx . . $ msafe_struct#pos2.; |
| 1336 | |
| 1337 | vis->custom_handlecxx . . $ vis_effect#custom_handle. = mstruct->texnumcxx . . $ msafe_struct#texnum.; |
| 1338 | |
| 1339 | vis->lighting_colorcxx . . $ vis_effect#lighting_color. = mstruct->colorcxx . . $ msafe_struct#color.; |
| 1340 | vis->billboard_infocxx . . $ vis_effect#billboard_info..widthcxx . . $ axis_billboard_info#width. = mstruct->sizecxx . . $ msafe_struct#size.; |
| 1341 | vis->billboard_infocxx . . $ vis_effect#billboard_info..texturecxx . . $ axis_billboard_info#texture. = mstruct->statecxx . . $ msafe_struct#state.; |
| 1342 | vis->velocitycxx . . $ vis_effect#velocity..xcxx . . $ vector#x. = mstruct->countcxx . . $ msafe_struct#count.; |
| 1343 | vis->velocitycxx . . $ vis_effect#velocity..ycxx . . $ vector#y. = mstruct->intervalcxx . . $ msafe_struct#interval.; |
| 1344 | vis->velocitycxx . . $ vis_effect#velocity..zcxx . . $ vector#z. = mstruct->indexcxx . . $ msafe_struct#index.; |
| 1345 | |
| 1346 | vis->flagscxx . . $ vis_effect#flags. = VF_USES_LIFELEFTcxx . . $ `Descent3/viseffect_external.h:64:9`! | VF_WINDSHIELD_EFFECTcxx . . $ `Descent3/viseffect_external.h:65:9`! | VF_LINK_TO_VIEWERcxx . . $ `Descent3/viseffect_external.h:72:9`!; |
| 1347 | vis->sizecxx . . $ vis_effect#size. = vm_VectorDistanceQuickcxx . . $ vm_VectorDistanceQuick(a0b9c8659ecc16b8).(&vis->poscxx . . $ vis_effect#pos., &vis->end_poscxx . . $ vis_effect#end_pos.); |
| 1348 | if (mstruct->flagscxx . . $ msafe_struct#flags.) // Do attached lightning effect |
| 1349 | { |
| 1350 | vis->flagscxx . . $ vis_effect#flags. |= VF_ATTACHEDcxx . . $ `Descent3/viseffect_external.h:70:9`!; |
| 1351 | vis->attach_infocxx . . $ vis_effect#attach_info..obj_handlecxx . . $ vis_attach_info#obj_handle. = MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->handlecxx . . $ object#handle.; |
| 1352 | vis->attach_infocxx . . $ vis_effect#attach_info..modelnumcxx . . $ vis_attach_info#modelnum. = MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..model_numcxx . . $ polyobj_info#model_num.; |
| 1353 | vis->attach_infocxx . . $ vis_effect#attach_info..vertnumcxx . . $ vis_attach_info#vertnum. = mstruct->g1cxx . . $ msafe_struct#g1.; |
| 1354 | vis->attach_infocxx . . $ vis_effect#attach_info..end_vertnumcxx . . $ vis_attach_info#end_vertnum. = mstruct->g2cxx . . $ msafe_struct#g2.; |
| 1355 | WeaponCalcGuncxx . . $ WeaponCalcGun(85e3752e9562a225).(&vis->poscxx . . $ vis_effect#pos., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, vis->attach_infocxx . . $ vis_effect#attach_info..vertnumcxx . . $ vis_attach_info#vertnum.); |
| 1356 | WeaponCalcGuncxx . . $ WeaponCalcGun(85e3752e9562a225).(&vis->end_poscxx . . $ vis_effect#end_pos., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, vis->attach_infocxx . . $ vis_effect#attach_info..end_vertnumcxx . . $ vis_attach_info#end_vertnum.); |
| 1357 | } else { |
| 1358 | vis->flagscxx . . $ vis_effect#flags. |= VF_ATTACHEDcxx . . $ `Descent3/viseffect_external.h:70:9`! | VF_PLANARcxx . . $ `Descent3/viseffect_external.h:67:9`!; |
| 1359 | vis->attach_infocxx . . $ vis_effect#attach_info..obj_handlecxx . . $ vis_attach_info#obj_handle. = MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->handlecxx . . $ object#handle.; |
| 1360 | vis->attach_infocxx . . $ vis_effect#attach_info..dest_objhandlecxx . . $ vis_attach_info#dest_objhandle. = IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->handlecxx . . $ object#handle.; |
| 1361 | vis->end_poscxx . . $ vis_effect#end_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->poscxx . . $ object#pos.; |
| 1362 | } |
| 1363 | } |
| 1364 | break; |
| 1365 | } |
| 1366 | case MSAFE_ROOM_TEXTUREcxx . . $ `scripts/osiris_common.h:785:9`!: { |
| 1367 | if (!VALIDATE_ROOM_FACEcxx . . $ VALIDATE_ROOM_FACE(cf9ef193275fa6d8).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., mstruct->facenumcxx . . $ msafe_struct#facenum.)) |
| 1368 | return; |
| 1369 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(Rooms[mstruct->roomnum].num_faces > mstruct->facenum); |
| 1370 | ChangeRoomFaceTexturecxx . . $ ChangeRoomFaceTexture(1432650661211742).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., mstruct->facenumcxx . . $ msafe_struct#facenum., mstruct->indexcxx . . $ msafe_struct#index.); |
| 1371 | break; |
| 1372 | } |
| 1373 | case MSAFE_ROOM_WINDcxx . . $ `scripts/osiris_common.h:786:9`!: |
| 1374 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1375 | return; |
| 1376 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].windcxx . . $ room#wind. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). mstruct->windcxx . . $ msafe_struct#wind.; |
| 1377 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_WINDcxx . . $ `Descent3/multi_world_state.h:52:9`!; |
| 1378 | break; |
| 1379 | case MSAFE_ROOM_FOGcxx . . $ `scripts/osiris_common.h:787:9`!: |
| 1380 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1381 | return; |
| 1382 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].fog_rcxx . . $ room#fog_r. = mstruct->fog_rcxx . . $ msafe_struct#fog_r.; |
| 1383 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].fog_gcxx . . $ room#fog_g. = mstruct->fog_gcxx . . $ msafe_struct#fog_g.; |
| 1384 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].fog_bcxx . . $ room#fog_b. = mstruct->fog_bcxx . . $ msafe_struct#fog_b.; |
| 1385 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].fog_depthcxx . . $ room#fog_depth. = mstruct->fog_depthcxx . . $ msafe_struct#fog_depth.; |
| 1386 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_FOGcxx . . $ `Descent3/multi_world_state.h:53:9`!; |
| 1387 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. |= RF_FOGcxx . . $ `Descent3/room_external.h:184:9`!; |
| 1388 | break; |
| 1389 | case MSAFE_ROOM_FOG_STATEcxx . . $ `scripts/osiris_common.h:790:9`!: |
| 1390 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1391 | return; |
| 1392 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1393 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. |= RF_FOGcxx . . $ `Descent3/room_external.h:184:9`!; |
| 1394 | else |
| 1395 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. &= ~RF_FOGcxx . . $ `Descent3/room_external.h:184:9`!; |
| 1396 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_FOGcxx . . $ `Descent3/multi_world_state.h:53:9`!; |
| 1397 | break; |
| 1398 | case MSAFE_ROOM_LIGHT_PULSEcxx . . $ `scripts/osiris_common.h:788:9`!: |
| 1399 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1400 | return; |
| 1401 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].pulse_timecxx . . $ room#pulse_time. = mstruct->pulse_timecxx . . $ msafe_struct#pulse_time.; |
| 1402 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].pulse_offsetcxx . . $ room#pulse_offset. = mstruct->pulse_offsetcxx . . $ msafe_struct#pulse_offset.; |
| 1403 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_LIGHTINGcxx . . $ `Descent3/multi_world_state.h:55:9`!; |
| 1404 | break; |
| 1405 | case MSAFE_ROOM_LIGHT_FLICKERcxx . . $ `scripts/osiris_common.h:794:9`!: |
| 1406 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1407 | return; |
| 1408 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1409 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. |= RF_FLICKERcxx . . $ `Descent3/room_external.h:194:9`!; |
| 1410 | else |
| 1411 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. &= ~RF_FLICKERcxx . . $ `Descent3/room_external.h:194:9`!; |
| 1412 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_LIGHTINGcxx . . $ `Descent3/multi_world_state.h:55:9`!; |
| 1413 | break; |
| 1414 | case MSAFE_ROOM_LIGHT_STROBEcxx . . $ `scripts/osiris_common.h:795:9`!: |
| 1415 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1416 | return; |
| 1417 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1418 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. |= RF_STROBEcxx . . $ `Descent3/room_external.h:193:9`!; |
| 1419 | else |
| 1420 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. &= ~RF_STROBEcxx . . $ `Descent3/room_external.h:193:9`!; |
| 1421 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_LIGHTINGcxx . . $ `Descent3/multi_world_state.h:55:9`!; |
| 1422 | break; |
| 1423 | case MSAFE_ROOM_REFUELcxx . . $ `scripts/osiris_common.h:796:9`!: |
| 1424 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1425 | return; |
| 1426 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1427 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. |= RF_FUELCENcxx . . $ `Descent3/room_external.h:175:9`!; |
| 1428 | else |
| 1429 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].flagscxx . . $ room#flags. &= ~RF_FUELCENcxx . . $ `Descent3/room_external.h:175:9`!; |
| 1430 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_REFUELcxx . . $ `Descent3/multi_world_state.h:60:9`!; |
| 1431 | break; |
| 1432 | case MSAFE_ROOM_CHANGING_FOGcxx . . $ `scripts/osiris_common.h:791:9`!: { |
| 1433 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1434 | return; |
| 1435 | vectorcxx . . $ vector# fog_vec; |
| 1436 | fog_vec.xcxx . . $ vector#x. = mstruct->fog_rcxx . . $ msafe_struct#fog_r.; |
| 1437 | fog_vec.ycxx . . $ vector#y. = mstruct->fog_gcxx . . $ msafe_struct#fog_g.; |
| 1438 | fog_vec.zcxx . . $ vector#z. = mstruct->fog_bcxx . . $ msafe_struct#fog_b.; |
| 1439 | SetRoomChangeOverTimecxx . . $ SetRoomChangeOverTime(c399af37c19651cb).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., 1, &fog_vec, mstruct->fog_depthcxx . . $ msafe_struct#fog_depth., mstruct->intervalcxx . . $ msafe_struct#interval.); |
| 1440 | break; |
| 1441 | } |
| 1442 | case MSAFE_ROOM_CHANGING_WINDcxx . . $ `scripts/osiris_common.h:792:9`!: { |
| 1443 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1444 | return; |
| 1445 | SetRoomChangeOverTimecxx . . $ SetRoomChangeOverTime(c399af37c19651cb).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., 0, &mstruct->windcxx . . $ msafe_struct#wind., 0, mstruct->intervalcxx . . $ msafe_struct#interval.); |
| 1446 | break; |
| 1447 | } |
| 1448 | case MSAFE_ROOM_PORTAL_RENDERcxx . . $ `scripts/osiris_common.h:789:9`!: { |
| 1449 | if (!VALIDATE_ROOM_PORTALcxx . . $ VALIDATE_ROOM_PORTAL(cf9ef193275fa6d8).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., mstruct->portalnumcxx . . $ msafe_struct#portalnum.)) |
| 1450 | return; |
| 1451 | |
| 1452 | portalcxx . . $ portal# *pp = &Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].portalscxx . . $ room#portals.[mstruct->portalnumcxx . . $ msafe_struct#portalnum.]; |
| 1453 | |
| 1454 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1455 | pp->flagscxx . . $ portal#flags. |= PF_RENDER_FACEScxx . . $ `Descent3/room_external.h:155:9`!; |
| 1456 | else |
| 1457 | pp->flagscxx . . $ portal#flags. &= ~PF_RENDER_FACEScxx . . $ `Descent3/room_external.h:155:9`!; |
| 1458 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_PORTAL_RENDERcxx . . $ `Descent3/multi_world_state.h:58:9`!; |
| 1459 | pp->flagscxx . . $ portal#flags. |= PF_CHANGEDcxx . . $ `Descent3/room_external.h:159:9`!; |
| 1460 | |
| 1461 | // check other side of portal |
| 1462 | if (mstruct->flagscxx . . $ msafe_struct#flags.) { |
| 1463 | portalcxx . . $ portal# *pp2 = &Roomscxx . . $ Rooms.[pp->croomcxx . . $ portal#croom.].portalscxx . . $ room#portals.[pp->cportalcxx . . $ portal#cportal.]; |
| 1464 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1465 | pp2->flagscxx . . $ portal#flags. |= PF_RENDER_FACEScxx . . $ `Descent3/room_external.h:155:9`!; |
| 1466 | else |
| 1467 | pp2->flagscxx . . $ portal#flags. &= ~PF_RENDER_FACEScxx . . $ `Descent3/room_external.h:155:9`!; |
| 1468 | Roomscxx . . $ Rooms.[pp->croomcxx . . $ portal#croom.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_PORTAL_RENDERcxx . . $ `Descent3/multi_world_state.h:58:9`!; |
| 1469 | pp2->flagscxx . . $ portal#flags. |= PF_CHANGEDcxx . . $ `Descent3/room_external.h:159:9`!; |
| 1470 | } |
| 1471 | break; |
| 1472 | } |
| 1473 | case MSAFE_ROOM_PORTAL_BLOCKcxx . . $ `scripts/osiris_common.h:799:9`!: { |
| 1474 | if (!VALIDATE_ROOM_PORTALcxx . . $ VALIDATE_ROOM_PORTAL(cf9ef193275fa6d8).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., mstruct->portalnumcxx . . $ msafe_struct#portalnum.)) |
| 1475 | return; |
| 1476 | |
| 1477 | portalcxx . . $ portal# *pp = &Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].portalscxx . . $ room#portals.[mstruct->portalnumcxx . . $ msafe_struct#portalnum.]; |
| 1478 | if (!(pp->flagscxx . . $ portal#flags. & (PF_BLOCKcxx . . $ `Descent3/room_external.h:160:9`! | PF_BLOCK_REMOVABLEcxx . . $ `Descent3/room_external.h:161:9`!))) |
| 1479 | return; |
| 1480 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1481 | pp->flagscxx . . $ portal#flags. |= PF_BLOCKcxx . . $ `Descent3/room_external.h:160:9`!; |
| 1482 | else |
| 1483 | pp->flagscxx . . $ portal#flags. &= ~PF_BLOCKcxx . . $ `Descent3/room_external.h:160:9`!; |
| 1484 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_PORTAL_BLOCKcxx . . $ `Descent3/multi_world_state.h:61:9`!; |
| 1485 | pp->flagscxx . . $ portal#flags. |= PF_CHANGEDcxx . . $ `Descent3/room_external.h:159:9`!; |
| 1486 | |
| 1487 | // check other side of portal |
| 1488 | portalcxx . . $ portal# *pp2 = &Roomscxx . . $ Rooms.[pp->croomcxx . . $ portal#croom.].portalscxx . . $ room#portals.[pp->cportalcxx . . $ portal#cportal.]; |
| 1489 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1490 | pp2->flagscxx . . $ portal#flags. |= PF_BLOCKcxx . . $ `Descent3/room_external.h:160:9`!; |
| 1491 | else |
| 1492 | pp2->flagscxx . . $ portal#flags. &= ~PF_BLOCKcxx . . $ `Descent3/room_external.h:160:9`!; |
| 1493 | Roomscxx . . $ Rooms.[pp->croomcxx . . $ portal#croom.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_PORTAL_BLOCKcxx . . $ `Descent3/multi_world_state.h:61:9`!; |
| 1494 | pp2->flagscxx . . $ portal#flags. |= PF_CHANGEDcxx . . $ `Descent3/room_external.h:159:9`!; |
| 1495 | break; |
| 1496 | } |
| 1497 | case MSAFE_ROOM_BREAK_GLASScxx . . $ `scripts/osiris_common.h:798:9`!: { |
| 1498 | void ComputeCenterPointOnFacecxx . . $ ComputeCenterPointOnFace(3ca293c02dfae4e1).(vectorcxx . . $ vector# * vp, roomcxx . . $ room# * rp, int facenum); |
| 1499 | if (!VALIDATE_ROOM_PORTALcxx . . $ VALIDATE_ROOM_PORTAL(cf9ef193275fa6d8).(mstruct->roomnumcxx . . $ msafe_struct#roomnum., mstruct->portalnumcxx . . $ msafe_struct#portalnum.)) |
| 1500 | return; |
| 1501 | send_it = 0; // Handled in function below |
| 1502 | |
| 1503 | BreakGlassFacecxx . . $ BreakGlassFace(13a53ec972efd3cd).(&Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.], Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].portalscxx . . $ room#portals.[mstruct->portalnumcxx . . $ msafe_struct#portalnum.].portal_facecxx . . $ portal#portal_face.); |
| 1504 | break; |
| 1505 | } |
| 1506 | case MSAFE_ROOM_DAMAGEcxx . . $ `scripts/osiris_common.h:793:9`!: |
| 1507 | if (!VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) |
| 1508 | return; |
| 1509 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].damagecxx . . $ room#damage. = mstruct->amountcxx . . $ msafe_struct#amount.; |
| 1510 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].damage_typecxx . . $ room#damage_type. = mstruct->indexcxx . . $ msafe_struct#index.; |
| 1511 | Roomscxx . . $ Rooms.[mstruct->roomnumcxx . . $ msafe_struct#roomnum.].room_change_flagscxx . . $ room#room_change_flags. |= RCF_DAMAGEcxx . . $ `Descent3/multi_world_state.h:59:9`!; |
| 1512 | break; |
| 1513 | case MSAFE_ROOM_REMOVE_ALL_POWERUPScxx . . $ `scripts/osiris_common.h:800:9`!: { |
| 1514 | if (VALIDATE_ROOMcxx . . $ VALIDATE_ROOM(83c267b20bac841a).(mstruct->roomnumcxx . . $ msafe_struct#roomnum.)) { |
| 1515 | int i, high_index; |
| 1516 | int invis_id; |
| 1517 | invis_id = FindObjectIDNamecxx . . $ FindObjectIDName(5c4306d8553b3696).("InvisiblePowerup"); |
| 1518 | high_index = Highest_object_indexcxx . . $ Highest_object_index. + 1; |
| 1519 | for (i = 0; i < high_index; i++) { |
| 1520 | if (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. != OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!) |
| 1521 | continue; |
| 1522 | if (Objectscxx . . $ Objects.[i].roomnumcxx . . $ object#roomnum. != mstruct->roomnumcxx . . $ msafe_struct#roomnum.) |
| 1523 | continue; |
| 1524 | if (Objectscxx . . $ Objects.[i].idcxx . . $ object#id. == invis_id) |
| 1525 | continue; |
| 1526 | SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(&Objectscxx . . $ Objects.[i], true, false); |
| 1527 | } |
| 1528 | } |
| 1529 | } break; |
| 1530 | case MSAFE_OBJECT_FIRE_WEAPONcxx . . $ `scripts/osiris_common.h:857:9`!: { |
| 1531 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1532 | if (objp && (mstruct->indexcxx . . $ msafe_struct#index. >= 0) && (mstruct->indexcxx . . $ msafe_struct#index. < MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!) && Weaponscxx . . $ Weapons.[mstruct->indexcxx . . $ msafe_struct#index.].usedcxx . . $ weapon#used.) |
| 1533 | FireWeaponFromObjectcxx . . $ FireWeaponFromObject(3c611958fe04e279).(objp, mstruct->indexcxx . . $ msafe_struct#index., mstruct->gunpointcxx . . $ msafe_struct#gunpoint.); |
| 1534 | send_it = 0; |
| 1535 | break; |
| 1536 | } |
| 1537 | case MSAFE_OBJECT_SETONFIREcxx . . $ `scripts/osiris_common.h:849:9`!: { |
| 1538 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1539 | return; |
| 1540 | |
| 1541 | objectcxx . . $ object# *obj = MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!; |
| 1542 | float damage_time = mstruct->longevitycxx . . $ msafe_struct#longevity.; |
| 1543 | float d_per_sec = mstruct->intervalcxx . . $ msafe_struct#interval.; |
| 1544 | if (obj->effect_infocxx . . $ object#effect_info.) { |
| 1545 | if (damage_time > 0) { |
| 1546 | obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. |= EF_NAPALMEDcxx . . $ `Descent3/object_external.h:200:9`!; |
| 1547 | obj->effect_infocxx . . $ object#effect_info.->damage_timecxx . . $ effect_info_s#damage_time. += damage_time; |
| 1548 | // NOTE: commented out because lava rocks need to go burning for awhile... |
| 1549 | // so we trust that someone doesn't do something stupid |
| 1550 | // obj->effect_info->damage_time=std::min(10.0f,obj->effect_info->damage_time); |
| 1551 | obj->effect_infocxx . . $ object#effect_info.->damage_per_secondcxx . . $ effect_info_s#damage_per_second. = d_per_sec; |
| 1552 | if (Gametimecxx . . $ Gametime. - obj->effect_infocxx . . $ object#effect_info.->last_damage_timecxx . . $ effect_info_s#last_damage_time. > 1.0f) |
| 1553 | obj->effect_infocxx . . $ object#effect_info.->last_damage_timecxx . . $ effect_info_s#last_damage_time. = 0; |
| 1554 | |
| 1555 | obj->effect_infocxx . . $ object#effect_info.->damage_handlecxx . . $ effect_info_s#damage_handle. = mstruct->ithandlecxx . . $ msafe_struct#ithandle.; |
| 1556 | if (obj->effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle. == SOUND_NONE_INDEXcxx . . $ `Descent3/sounds.h:105:9`!) |
| 1557 | obj->effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle. = Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(17f485224ada8dd7).(SOUND_PLAYER_BURNINGcxx . . $ `Descent3/sounds.h:134:9`!, SND_PRIORITY_HIGHESTcxx . . $ `sndlib/ssl_lib.h:282:9`!, obj); |
| 1558 | } else { |
| 1559 | obj->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. &= ~EF_NAPALMEDcxx . . $ `Descent3/object_external.h:200:9`!; |
| 1560 | obj->effect_infocxx . . $ object#effect_info.->damage_timecxx . . $ effect_info_s#damage_time. = 0; |
| 1561 | } |
| 1562 | } |
| 1563 | } break; |
| 1564 | case MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!: |
| 1565 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1566 | return; |
| 1567 | |
| 1568 | MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->shieldscxx . . $ object#shields. = mstruct->shieldscxx . . $ msafe_struct#shields.; |
| 1569 | MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->flagscxx . . $ object#flags. &= ~(OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!); |
| 1570 | |
| 1571 | break; |
| 1572 | case MSAFE_OBJECT_ENERGYcxx . . $ `scripts/osiris_common.h:803:9`!: |
| 1573 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1574 | return; |
| 1575 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 1576 | Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].energycxx . . $ player#energy. = mstruct->energycxx . . $ msafe_struct#energy.; |
| 1577 | break; |
| 1578 | case MSAFE_SHOW_ENABLED_CONTROLScxx . . $ `scripts/osiris_common.h:856:9`!: { |
| 1579 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1580 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1581 | Hud_show_controlscxx . . $ Hud_show_controls. = mstruct->statecxx . . $ msafe_struct#state. ? true : false; |
| 1582 | } |
| 1583 | } break; |
| 1584 | case MSAFE_OBJECT_PLAYER_CMASKcxx . . $ `scripts/osiris_common.h:839:9`!: { |
| 1585 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1586 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 1587 | if (mstruct->control_valcxx . . $ msafe_struct#control_val.) |
| 1588 | Playerscxx . . $ Players.[objp->idcxx . . $ object#id.].controller_bitflagscxx . . $ player#controller_bitflags. |= mstruct->control_maskcxx . . $ msafe_struct#control_mask.; |
| 1589 | else |
| 1590 | Playerscxx . . $ Players.[objp->idcxx . . $ object#id.].controller_bitflagscxx . . $ player#controller_bitflags. &= ~mstruct->control_maskcxx . . $ msafe_struct#control_mask.; |
| 1591 | } |
| 1592 | break; |
| 1593 | } |
| 1594 | case MSAFE_OBJECT_PLAYER_KEYcxx . . $ `scripts/osiris_common.h:844:9`!: { |
| 1595 | int slot = GetPlayerSlotcxx . . $ GetPlayerSlot(7864480464b09eea).(mstruct->ithandlecxx . . $ msafe_struct#ithandle.); |
| 1596 | if (slot == -1) |
| 1597 | break; // couldn't find player object |
| 1598 | if (Playerscxx . . $ Players.[slot].keyscxx . . $ player#keys. & KEY_FLAGcxx . . $ `Descent3/doorway.h:140:9`!(mstruct->index)) |
| 1599 | return; // if player already has key, do nothing |
| 1600 | // We should really have a function to set the key flags |
| 1601 | Playerscxx . . $ Players.[slot].keyscxx . . $ player#keys. |= KEY_FLAGcxx . . $ `Descent3/doorway.h:140:9`!(mstruct->index); |
| 1602 | Global_keyscxx . . $ Global_keys. |= KEY_FLAGcxx . . $ `Descent3/doorway.h:140:9`!(mstruct->index); |
| 1603 | if (mstruct->objhandlecxx . . $ msafe_struct#objhandle. != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 1604 | objectcxx . . $ object# *keyobj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1605 | if (keyobj) { |
| 1606 | mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Adding key from multisafe to player %d\n", slot); |
| 1607 | Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(17f485224ada8dd7).(SOUND_POWERUP_PICKUPcxx . . $ `Descent3/sounds.h:116:9`!, SND_PRIORITY_HIGHcxx . . $ `sndlib/ssl_lib.h:283:9`!, keyobj); |
| 1608 | Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(keyobj->typecxx . . $ object#type., keyobj->idcxx . . $ object#id., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, -1, -1, INVAF_NOTSPEWABLEcxx . . $ `scripts/osiris_common.h:765:9`!, mstruct->messagecxx . . $ msafe_struct#message.); |
| 1609 | |
| 1610 | if (!(Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!)) // If not multiplayer, delete the key |
| 1611 | { |
| 1612 | SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(keyobj); |
| 1613 | } else if ((keyobj->flagscxx . . $ object#flags. & OF_INFORM_DESTROY_TO_LGcxx . . $ `Descent3/object_external.h:302:9`!)) { |
| 1614 | Level_goalscxx . . $ Level_goals..Informcxx . . $ levelgoals#Inform(8589f1c7c2d24df6).(LIT_OBJECTcxx . . $ `Descent3/levelgoal_external.h:28:9`!, LGF_COMP_DESTROYcxx . . $ `Descent3/levelgoal_external.h:48:9`!, keyobj->handlecxx . . $ object#handle.); |
| 1615 | } |
| 1616 | } |
| 1617 | } |
| 1618 | send_it = 0; // Handled by server |
| 1619 | break; |
| 1620 | } |
| 1621 | case MSAFE_OBJECT_MOVEMENT_SCALARcxx . . $ `scripts/osiris_common.h:806:9`!: |
| 1622 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1623 | return; |
| 1624 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 1625 | Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].movement_scalarcxx . . $ player#movement_scalar. = mstruct->scalarcxx . . $ msafe_struct#scalar.; |
| 1626 | break; |
| 1627 | case MSAFE_OBJECT_RECHARGE_SCALARcxx . . $ `scripts/osiris_common.h:807:9`!: |
| 1628 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1629 | return; |
| 1630 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 1631 | Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].weapon_recharge_scalarcxx . . $ player#weapon_recharge_scalar. = mstruct->scalarcxx . . $ msafe_struct#scalar.; |
| 1632 | break; |
| 1633 | case MSAFE_OBJECT_WSPEED_SCALARcxx . . $ `scripts/osiris_common.h:808:9`!: |
| 1634 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1635 | return; |
| 1636 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 1637 | Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].weapon_speed_scalarcxx . . $ player#weapon_speed_scalar. = mstruct->scalarcxx . . $ msafe_struct#scalar.; |
| 1638 | break; |
| 1639 | case MSAFE_OBJECT_ARMOR_SCALARcxx . . $ `scripts/osiris_common.h:810:9`!: |
| 1640 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1641 | return; |
| 1642 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 1643 | Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].armor_scalarcxx . . $ player#armor_scalar. = mstruct->scalarcxx . . $ msafe_struct#scalar.; |
| 1644 | break; |
| 1645 | case MSAFE_OBJECT_DAMAGE_SCALARcxx . . $ `scripts/osiris_common.h:809:9`!: |
| 1646 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1647 | return; |
| 1648 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 1649 | Playerscxx . . $ Players.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].damage_scalarcxx . . $ player#damage_scalar. = mstruct->scalarcxx . . $ msafe_struct#scalar.; |
| 1650 | break; |
| 1651 | case MSAFE_OBJECT_ADD_WEAPONcxx . . $ `scripts/osiris_common.h:814:9`!: |
| 1652 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1653 | return; |
| 1654 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 1655 | AddWeaponToPlayercxx . . $ AddWeaponToPlayer(2326284602b0bb2d).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id., mstruct->indexcxx . . $ msafe_struct#index., mstruct->ammocxx . . $ msafe_struct#ammo.); |
| 1656 | if (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) |
| 1657 | send_it = 0; // Don't send because the server is picking it up |
| 1658 | break; |
| 1659 | case MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!: |
| 1660 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1661 | return; |
| 1662 | send_it = 0; // Don't need to send because ApplyDamage does the work |
| 1663 | if (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 1664 | if (mstruct->killer_handlecxx . . $ msafe_struct#killer_handle. == OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) |
| 1665 | ApplyDamageToPlayercxx . . $ ApplyDamageToPlayer(1fbfa7277d8ac7b4).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, mstruct->damage_typecxx . . $ msafe_struct#damage_type., mstruct->amountcxx . . $ msafe_struct#amount.); |
| 1666 | else |
| 1667 | ApplyDamageToPlayercxx . . $ ApplyDamageToPlayer(1fbfa7277d8ac7b4).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, KOBJcxx . . $ `Descent3/multisafe.cpp:686:9`!, mstruct->damage_typecxx . . $ msafe_struct#damage_type., mstruct->amountcxx . . $ msafe_struct#amount.); |
| 1668 | } else { |
| 1669 | if (mstruct->killer_handlecxx . . $ msafe_struct#killer_handle. == OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) |
| 1670 | ApplyDamageToGenericcxx . . $ ApplyDamageToGeneric(5474b9d0c3697015).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, mstruct->damage_typecxx . . $ msafe_struct#damage_type., mstruct->amountcxx . . $ msafe_struct#amount.); |
| 1671 | else |
| 1672 | ApplyDamageToGenericcxx . . $ ApplyDamageToGeneric(5474b9d0c3697015).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, KOBJcxx . . $ `Descent3/multisafe.cpp:686:9`!, mstruct->damage_typecxx . . $ msafe_struct#damage_type., mstruct->amountcxx . . $ msafe_struct#amount.); |
| 1673 | } |
| 1674 | break; |
| 1675 | case MSAFE_OBJECT_START_SPEWcxx . . $ `scripts/osiris_common.h:815:9`!: { |
| 1676 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1677 | return; |
| 1678 | spewinfocxx . . $ spewinfo# spew; |
| 1679 | if (mstruct->gunpointcxx . . $ msafe_struct#gunpoint. == -2) { // no gun |
| 1680 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1681 | if (!objp) |
| 1682 | break; |
| 1683 | spew.use_gunpointcxx . . $ spewinfo#use_gunpoint. = false; |
| 1684 | spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..origincxx . . $ pointinfo#origin. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->poscxx . . $ object#pos.; |
| 1685 | spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..normalcxx . . $ pointinfo#normal. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->orientcxx . . $ object#orient..uveccxx . . $ matrix#uvec.; |
| 1686 | spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..room_numcxx . . $ pointinfo#room_num. = objp->roomnumcxx . . $ object#roomnum.; |
| 1687 | } else if (mstruct->gunpointcxx . . $ msafe_struct#gunpoint. == -1) { // no gun |
| 1688 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1689 | if (!objp) |
| 1690 | break; |
| 1691 | spew.use_gunpointcxx . . $ spewinfo#use_gunpoint. = false; |
| 1692 | spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..origincxx . . $ pointinfo#origin. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->poscxx . . $ object#pos.; |
| 1693 | spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..normalcxx . . $ pointinfo#normal. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). objp->orientcxx . . $ object#orient..fveccxx . . $ matrix#fvec.; |
| 1694 | spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..room_numcxx . . $ pointinfo#room_num. = objp->roomnumcxx . . $ object#roomnum.; |
| 1695 | } else { |
| 1696 | spew.use_gunpointcxx . . $ spewinfo#use_gunpoint. = true; |
| 1697 | spew.gpcxx . . $ spewinfo#$anonymous_type_0#gp..obj_handlecxx . . $ guninfo#obj_handle. = mstruct->objhandlecxx . . $ msafe_struct#objhandle.; |
| 1698 | spew.gpcxx . . $ spewinfo#$anonymous_type_0#gp..gunpointcxx . . $ guninfo#gunpoint. = mstruct->gunpointcxx . . $ msafe_struct#gunpoint.; |
| 1699 | } |
| 1700 | spew.randomcxx . . $ spewinfo#random. = mstruct->randomcxx . . $ msafe_struct#random.; |
| 1701 | spew.real_objcxx . . $ spewinfo#real_obj. = (bool)(mstruct->is_realcxx . . $ msafe_struct#is_real. != 0); |
| 1702 | spew.effect_typecxx . . $ spewinfo#effect_type. = mstruct->effect_typecxx . . $ msafe_struct#effect_type.; |
| 1703 | spew.phys_infocxx . . $ spewinfo#phys_info. = mstruct->phys_infocxx . . $ msafe_struct#phys_info.; |
| 1704 | spew.dragcxx . . $ spewinfo#drag. = mstruct->dragcxx . . $ msafe_struct#drag.; |
| 1705 | spew.masscxx . . $ spewinfo#mass. = mstruct->masscxx . . $ msafe_struct#mass.; |
| 1706 | spew.time_intcxx . . $ spewinfo#time_int. = mstruct->intervalcxx . . $ msafe_struct#interval.; |
| 1707 | spew.longevitycxx . . $ spewinfo#longevity. = mstruct->longevitycxx . . $ msafe_struct#longevity.; |
| 1708 | spew.lifetimecxx . . $ spewinfo#lifetime. = mstruct->lifetimecxx . . $ msafe_struct#lifetime.; |
| 1709 | spew.sizecxx . . $ spewinfo#size. = mstruct->sizecxx . . $ msafe_struct#size.; |
| 1710 | spew.speedcxx . . $ spewinfo#speed. = mstruct->speedcxx . . $ msafe_struct#speed.; |
| 1711 | if ((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 1712 | int spewnum = SpewCreatecxx . . $ SpewCreate(a164fa5b42524a40).(&spew); |
| 1713 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(spewnum != -1); // DAJ -1FIX |
| 1714 | spewnum &= 0xFF; |
| 1715 | |
| 1716 | Server_spew_listcxx . . $ Server_spew_list.[mstruct->idcxx . . $ msafe_struct#id.] = spewnum; |
| 1717 | } else { |
| 1718 | mstruct->idcxx . . $ msafe_struct#id. = SpewCreatecxx . . $ SpewCreate(a164fa5b42524a40).(&spew); |
| 1719 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(mstruct->id != -1); // DAJ -1FIX |
| 1720 | } |
| 1721 | break; |
| 1722 | } |
| 1723 | case MSAFE_OBJECT_STOP_SPEWcxx . . $ `scripts/osiris_common.h:816:9`!: { |
| 1724 | if ((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 1725 | SpewClearEventcxx . . $ SpewClearEvent(918ebd27a9ddbad3).(SpewEffectscxx . . $ SpewEffects.[mstruct->idcxx . . $ msafe_struct#id.].handlecxx . . $ spewinfo#handle., true); |
| 1726 | Server_spew_listcxx . . $ Server_spew_list.[mstruct->idcxx . . $ msafe_struct#id.] = 65535; |
| 1727 | } else { |
| 1728 | SpewClearEventcxx . . $ SpewClearEvent(918ebd27a9ddbad3).(mstruct->idcxx . . $ msafe_struct#id., true); |
| 1729 | } |
| 1730 | break; |
| 1731 | } |
| 1732 | case MSAFE_OBJECT_NO_RENDERcxx . . $ `scripts/osiris_common.h:840:9`!: |
| 1733 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1734 | return; |
| 1735 | MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->render_typecxx . . $ object#render_type. = RT_NONEcxx . . $ `Descent3/object_external.h:257:9`!; |
| 1736 | MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->change_flagscxx . . $ object#change_flags. |= OCF_NO_RENDERcxx . . $ `Descent3/multi_world_state.h:65:9`!; |
| 1737 | break; |
| 1738 | case MSAFE_OBJECT_GHOSTcxx . . $ `scripts/osiris_common.h:817:9`!: |
| 1739 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1740 | return; |
| 1741 | if (ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)->typecxx . . $ object#type. == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) |
| 1742 | return; |
| 1743 | if (ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)->typecxx . . $ object#type. == OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!) |
| 1744 | return; // Don't ghost a ghosted object!! |
| 1745 | if (ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) |
| 1746 | return; |
| 1747 | if (ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)->typecxx . . $ object#type. == OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`!) |
| 1748 | return; |
| 1749 | ObjGhostObjectcxx . . $ ObjGhostObject(d4f767463ce0a6b3).(mstruct->objhandlecxx . . $ msafe_struct#objhandle. & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!); |
| 1750 | break; |
| 1751 | case MSAFE_OBJECT_UNGHOSTcxx . . $ `scripts/osiris_common.h:818:9`!: |
| 1752 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1753 | return; |
| 1754 | if (ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)->typecxx . . $ object#type. != OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!) |
| 1755 | return; // Don't unghost an unghosted object!! |
| 1756 | ObjUnGhostObjectcxx . . $ ObjUnGhostObject(d4f767463ce0a6b3).(mstruct->objhandlecxx . . $ msafe_struct#objhandle. & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!); |
| 1757 | break; |
| 1758 | case MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!: |
| 1759 | send_it = 0; |
| 1760 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1761 | return; |
| 1762 | |
| 1763 | SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, true, (bool)(mstruct->playsoundcxx . . $ msafe_struct#playsound. != 0)); |
| 1764 | if (mstruct->playsoundcxx . . $ msafe_struct#playsound.) |
| 1765 | Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(17f485224ada8dd7).(SOUND_POWERUP_PICKUPcxx . . $ `Descent3/sounds.h:116:9`!, SND_PRIORITY_HIGHcxx . . $ `sndlib/ssl_lib.h:283:9`!, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!); |
| 1766 | break; |
| 1767 | case MSAFE_OBJECT_INVULNERABLEcxx . . $ `scripts/osiris_common.h:836:9`!: { |
| 1768 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1769 | return; |
| 1770 | |
| 1771 | if (MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 1772 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1773 | MakePlayerInvulnerablecxx . . $ MakePlayerInvulnerable(a421cb528a2d8d2f).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id., mstruct->lifetimecxx . . $ msafe_struct#lifetime.); |
| 1774 | else |
| 1775 | MakePlayerVulnerablecxx . . $ MakePlayerVulnerable(d4f767463ce0a6b3).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.); |
| 1776 | } else { |
| 1777 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 1778 | MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->flagscxx . . $ object#flags. &= ~OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!; |
| 1779 | else |
| 1780 | MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->flagscxx . . $ object#flags. |= OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!; |
| 1781 | } |
| 1782 | send_it = 1; |
| 1783 | break; |
| 1784 | } |
| 1785 | case MSAFE_OBJECT_CLOAKALLPLAYERScxx . . $ `scripts/osiris_common.h:832:9`!: { |
| 1786 | if (mstruct->statecxx . . $ msafe_struct#state.) { |
| 1787 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 1788 | for (int i = 0; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 1789 | if (NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[i].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) { |
| 1790 | MakeObjectInvisiblecxx . . $ MakeObjectInvisible(3cdd7424a643b971).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.], mstruct->lifetimecxx . . $ msafe_struct#lifetime., 1.0f, true); |
| 1791 | } |
| 1792 | } |
| 1793 | } else { |
| 1794 | MakeObjectInvisiblecxx . . $ MakeObjectInvisible(3cdd7424a643b971).(Player_objectcxx . . $ Player_object., mstruct->lifetimecxx . . $ msafe_struct#lifetime., 1.0f, true); |
| 1795 | } |
| 1796 | } else { |
| 1797 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 1798 | for (int i = 0; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 1799 | if (NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[i].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) { |
| 1800 | MakeObjectVisiblecxx . . $ MakeObjectVisible(419c470199a90a97).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.]); |
| 1801 | } |
| 1802 | } |
| 1803 | } else { |
| 1804 | MakeObjectVisiblecxx . . $ MakeObjectVisible(419c470199a90a97).(Player_objectcxx . . $ Player_object.); |
| 1805 | } |
| 1806 | } |
| 1807 | send_it = 1; |
| 1808 | } break; |
| 1809 | case MSAFE_OBJECT_CLOAKcxx . . $ `scripts/osiris_common.h:837:9`!: { |
| 1810 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1811 | return; |
| 1812 | if (mstruct->statecxx . . $ msafe_struct#state.) { |
| 1813 | MakeObjectInvisiblecxx . . $ MakeObjectInvisible(3cdd7424a643b971).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, mstruct->lifetimecxx . . $ msafe_struct#lifetime.); |
| 1814 | } else { |
| 1815 | MakeObjectVisiblecxx . . $ MakeObjectVisible(419c470199a90a97).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!); |
| 1816 | } |
| 1817 | send_it = 1; |
| 1818 | break; |
| 1819 | } |
| 1820 | case MSAFE_OBJECT_LIGHT_DISTcxx . . $ `scripts/osiris_common.h:841:9`!: { |
| 1821 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1822 | if (objp) { |
| 1823 | ObjSetLocalLightingcxx . . $ ObjSetLocalLighting(419c470199a90a97).(objp); |
| 1824 | if (mstruct->light_distancecxx . . $ msafe_struct#light_distance. < 0) |
| 1825 | mstruct->light_distancecxx . . $ msafe_struct#light_distance. = 0; |
| 1826 | objp->lighting_infocxx . . $ object#lighting_info.->light_distancecxx . . $ light_info#light_distance. = mstruct->light_distancecxx . . $ msafe_struct#light_distance.; |
| 1827 | objp->change_flagscxx . . $ object#change_flags. |= OCF_LIGHT_DISTANCEcxx . . $ `Descent3/multi_world_state.h:66:9`!; |
| 1828 | } |
| 1829 | break; |
| 1830 | } |
| 1831 | case MSAFE_OBJECT_LIGHT_COLORcxx . . $ `scripts/osiris_common.h:805:9`!: { |
| 1832 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1833 | if (objp) { |
| 1834 | ObjSetLocalLightingcxx . . $ ObjSetLocalLighting(419c470199a90a97).(objp); |
| 1835 | objp->lighting_infocxx . . $ object#lighting_info.->red_light1cxx . . $ light_info#red_light1. = mstruct->r1cxx . . $ msafe_struct#r1.; |
| 1836 | objp->lighting_infocxx . . $ object#lighting_info.->green_light1cxx . . $ light_info#green_light1. = mstruct->g1cxx . . $ msafe_struct#g1.; |
| 1837 | objp->lighting_infocxx . . $ object#lighting_info.->blue_light1cxx . . $ light_info#blue_light1. = mstruct->b1cxx . . $ msafe_struct#b1.; |
| 1838 | objp->change_flagscxx . . $ object#change_flags. |= OCF_LIGHT_COLORcxx . . $ `Descent3/multi_world_state.h:67:9`!; |
| 1839 | } |
| 1840 | break; |
| 1841 | } |
| 1842 | case MSAFE_OBJECT_DEFORMcxx . . $ `scripts/osiris_common.h:842:9`!: { |
| 1843 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1844 | if (objp && objp->effect_infocxx . . $ object#effect_info.) { |
| 1845 | objp->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. |= EF_DEFORMcxx . . $ `Descent3/object_external.h:198:9`!; |
| 1846 | objp->effect_infocxx . . $ object#effect_info.->deform_rangecxx . . $ effect_info_s#deform_range. = mstruct->amountcxx . . $ msafe_struct#amount.; |
| 1847 | objp->effect_infocxx . . $ object#effect_info.->deform_timecxx . . $ effect_info_s#deform_time. = mstruct->lifetimecxx . . $ msafe_struct#lifetime.; |
| 1848 | } |
| 1849 | break; |
| 1850 | } |
| 1851 | case MSAFE_OBJECT_SPARKScxx . . $ `scripts/osiris_common.h:848:9`!: { |
| 1852 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1853 | if (objp && objp->effect_infocxx . . $ object#effect_info.) { |
| 1854 | objp->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. |= EF_SPARKINGcxx . . $ `Descent3/object_external.h:210:9`!; |
| 1855 | objp->effect_infocxx . . $ object#effect_info.->spark_delaycxx . . $ effect_info_s#spark_delay. = 1.0 / mstruct->amountcxx . . $ msafe_struct#amount.; |
| 1856 | objp->effect_infocxx . . $ object#effect_info.->spark_timercxx . . $ effect_info_s#spark_timer. = 0; |
| 1857 | objp->effect_infocxx . . $ object#effect_info.->spark_time_leftcxx . . $ effect_info_s#spark_time_left. = mstruct->lifetimecxx . . $ msafe_struct#lifetime.; |
| 1858 | } |
| 1859 | break; |
| 1860 | } |
| 1861 | case MSAFE_OBJECT_VIEWER_SHAKEcxx . . $ `scripts/osiris_common.h:843:9`!: { |
| 1862 | AddToShakeMagnitudecxx . . $ AddToShakeMagnitude(9364e6e7bff7660).(mstruct->amountcxx . . $ msafe_struct#amount.); |
| 1863 | break; |
| 1864 | } |
| 1865 | case MSAFE_OBJECT_SHAKE_AREAcxx . . $ `scripts/osiris_common.h:852:9`!: { |
| 1866 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1867 | if (objp) { |
| 1868 | float dist = vm_VectorDistanceQuickcxx . . $ vm_VectorDistanceQuick(a0b9c8659ecc16b8).(&Viewer_objectcxx . . $ Viewer_object.->poscxx . . $ object#pos., &objp->poscxx . . $ object#pos.); |
| 1869 | if (dist < mstruct->scalarcxx . . $ msafe_struct#scalar.) |
| 1870 | AddToShakeMagnitudecxx . . $ AddToShakeMagnitude(9364e6e7bff7660).(mstruct->amountcxx . . $ msafe_struct#amount. * (1.0 - (dist / mstruct->scalarcxx . . $ msafe_struct#scalar.))); |
| 1871 | } |
| 1872 | break; |
| 1873 | } |
| 1874 | case MSAFE_OBJECT_WORLD_POSITIONcxx . . $ `scripts/osiris_common.h:846:9`!: { |
| 1875 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1876 | send_it = 0; |
| 1877 | if (objp) { |
| 1878 | if (mstruct->roomnumcxx . . $ msafe_struct#roomnum. != -1) { |
| 1879 | ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(objp, &mstruct->poscxx . . $ msafe_struct#pos., mstruct->roomnumcxx . . $ msafe_struct#roomnum., &mstruct->orientcxx . . $ msafe_struct#orient., true); |
| 1880 | // When DON'T we want to send this to the clients?? |
| 1881 | send_it = 1; |
| 1882 | } |
| 1883 | } |
| 1884 | } break; |
| 1885 | case MSAFE_OBJECT_PLAYER_CONTROLAIcxx . . $ `scripts/osiris_common.h:845:9`!: { |
| 1886 | bool ok = false; |
| 1887 | send_it = 0; |
| 1888 | if ((mstruct->slotcxx . . $ msafe_struct#slot. >= 0) && (mstruct->slotcxx . . $ msafe_struct#slot. < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!) && (Playerscxx . . $ Players.[mstruct->slotcxx . . $ msafe_struct#slot.].objnumcxx . . $ player#objnum. != -1)) { |
| 1889 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 1890 | if (NetPlayerscxx . . $ NetPlayers.[mstruct->slotcxx . . $ msafe_struct#slot.].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[mstruct->slotcxx . . $ msafe_struct#slot.].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) |
| 1891 | ok = true; |
| 1892 | } else { |
| 1893 | if (mstruct->slotcxx . . $ msafe_struct#slot. == 0) |
| 1894 | ok = true; |
| 1895 | } |
| 1896 | } |
| 1897 | if (ok) { |
| 1898 | // if mstruct->state is true, then set to AI |
| 1899 | // else set back to control mode |
| 1900 | osipf_SetPlayerControlModecxx . . $ osipf_SetPlayerControlMode(918ebd27a9ddbad3).(mstruct->slotcxx . . $ msafe_struct#slot., (bool)(mstruct->statecxx . . $ msafe_struct#state. != 0)); |
| 1901 | } |
| 1902 | } break; |
| 1903 | case MSAFE_OBJECT_DESTROY_ROBOTS_EXCEPTcxx . . $ `scripts/osiris_common.h:858:9`!: { |
| 1904 | // destroy all object (generics) except those in the list specified |
| 1905 | tKillObjectItemcxx . . $ tKillObjectItem# *koilist = (tKillObjectItemcxx . . $ tKillObjectItem# *)mstruct->listcxx . . $ msafe_struct#list.; |
| 1906 | int koisize = mstruct->countcxx . . $ msafe_struct#count.; |
| 1907 | bool kill_it; |
| 1908 | send_it = 0; |
| 1909 | // go through all generic objects, kill those that don't match an exception |
| 1910 | for (int i = 0; i <= Highest_object_indexcxx . . $ Highest_object_index.; i++) { |
| 1911 | if (IS_ROBOTcxx . . $ `Descent3/object_external.h:194:9`!((&Objects[i])) && !(IS_GUIDEBOTcxx . . $ `Descent3/objinfo.h:363:9`!(&Objects[i]))) { |
| 1912 | kill_it = true; |
| 1913 | // see if it's on the exception list |
| 1914 | for (int x = 0; x < koisize; x++) { |
| 1915 | switch (koilist[x].info_typecxx . . $ tKillObjectItem#info_type.) { |
| 1916 | case KOI_IDcxx . . $ `scripts/osiris_common.h:1211:9`!: |
| 1917 | if (Objectscxx . . $ Objects.[i].idcxx . . $ object#id. == koilist[x].idcxx . . $ tKillObjectItem#id.) { |
| 1918 | // spare it! |
| 1919 | kill_it = false; |
| 1920 | } |
| 1921 | break; |
| 1922 | case KOI_HANDLEcxx . . $ `scripts/osiris_common.h:1212:9`!: |
| 1923 | if (Objectscxx . . $ Objects.[i].handlecxx . . $ object#handle. == koilist[x].objhandlecxx . . $ tKillObjectItem#objhandle.) { |
| 1924 | // spare it! |
| 1925 | kill_it = false; |
| 1926 | } |
| 1927 | break; |
| 1928 | } |
| 1929 | if (kill_it == false) |
| 1930 | break; |
| 1931 | } |
| 1932 | if (kill_it) { |
| 1933 | SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(&Objectscxx . . $ Objects.[i], true, false); |
| 1934 | } |
| 1935 | } |
| 1936 | } |
| 1937 | } break; |
| 1938 | case MSAFE_SOUND_STREAMINGcxx . . $ `scripts/osiris_common.h:868:9`!: { |
| 1939 | int slot; |
| 1940 | if (mstruct->statecxx . . $ msafe_struct#state.) { // player specified |
| 1941 | slot = GetPlayerSlotcxx . . $ GetPlayerSlot(7864480464b09eea).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1942 | if (slot == -1) |
| 1943 | break; // couldn't find player object |
| 1944 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 1945 | } else |
| 1946 | slot = -1; // all players |
| 1947 | if ((slot == -1) || (slot == Player_numcxx . . $ Player_num.)) |
| 1948 | mstruct->sound_handlecxx . . $ msafe_struct#sound_handle. = StreamPlaycxx . . $ StreamPlay(d157d8952ffc14b5).(mstruct->namecxx . . $ msafe_struct#name., mstruct->volumecxx . . $ msafe_struct#volume., mstruct->flagscxx . . $ msafe_struct#flags.); |
| 1949 | if ((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && slot == Player_numcxx . . $ Player_num.) |
| 1950 | send_it = 0; |
| 1951 | mstruct->slotcxx . . $ msafe_struct#slot. = slot; // for send_to |
| 1952 | break; |
| 1953 | } |
| 1954 | case MSAFE_SOUND_2Dcxx . . $ `scripts/osiris_common.h:866:9`!: { |
| 1955 | int slot; |
| 1956 | if (mstruct->statecxx . . $ msafe_struct#state.) { // player specified |
| 1957 | slot = GetPlayerSlotcxx . . $ GetPlayerSlot(7864480464b09eea).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1958 | if (slot == -1) |
| 1959 | break; // couldn't find player object |
| 1960 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 1961 | } else |
| 1962 | slot = -1; // all players |
| 1963 | if ((slot == -1) || (slot == Player_numcxx . . $ Player_num.)) |
| 1964 | mstruct->sound_handlecxx . . $ msafe_struct#sound_handle. = Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(7bec394c8d81705d).(mstruct->indexcxx . . $ msafe_struct#index., SND_PRIORITY_HIGHESTcxx . . $ `sndlib/ssl_lib.h:282:9`!, mstruct->volumecxx . . $ msafe_struct#volume.); |
| 1965 | else |
| 1966 | mstruct->sound_handlecxx . . $ msafe_struct#sound_handle. = -1; |
| 1967 | if ((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && slot == Player_numcxx . . $ Player_num.) |
| 1968 | send_it = 0; |
| 1969 | mstruct->slotcxx . . $ msafe_struct#slot. = slot; // for send_to |
| 1970 | break; |
| 1971 | } |
| 1972 | case MSAFE_SOUND_OBJECTcxx . . $ `scripts/osiris_common.h:867:9`!: { |
| 1973 | if (!VALIDATE_OBJECTcxx . . $ VALIDATE_OBJECT(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.)) |
| 1974 | return; |
| 1975 | mstruct->sound_handlecxx . . $ msafe_struct#sound_handle. = Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(17f485224ada8dd7).(mstruct->indexcxx . . $ msafe_struct#index., SND_PRIORITY_HIGHESTcxx . . $ `sndlib/ssl_lib.h:282:9`!, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!); |
| 1976 | break; |
| 1977 | } |
| 1978 | case MSAFE_SOUND_STOPcxx . . $ `scripts/osiris_common.h:869:9`!: |
| 1979 | Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 1980 | send_it = 0; |
| 1981 | break; |
| 1982 | case MSAFE_SOUND_STOP_OBJcxx . . $ `scripts/osiris_common.h:870:9`!: |
| 1983 | Sound_systemcxx . . $ Sound_system..StopObjectSoundcxx . . $ hlsSystem#StopObjectSound(d4f767463ce0a6b3).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1984 | break; |
| 1985 | case MSAFE_SOUND_VOLUME_OBJcxx . . $ `scripts/osiris_common.h:871:9`!: |
| 1986 | Sound_systemcxx . . $ Sound_system..SetVolumeObjectcxx . . $ hlsSystem#SetVolumeObject(43c79ee2f1b9aefe).(mstruct->objhandlecxx . . $ msafe_struct#objhandle., mstruct->volumecxx . . $ msafe_struct#volume.); |
| 1987 | break; |
| 1988 | case MSAFE_MUSIC_REGIONcxx . . $ `scripts/osiris_common.h:887:9`!: { |
| 1989 | int slot; |
| 1990 | if (mstruct->statecxx . . $ msafe_struct#state.) { // player specified |
| 1991 | slot = GetPlayerSlotcxx . . $ GetPlayerSlot(7864480464b09eea).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 1992 | if (slot == -1) |
| 1993 | break; // couldn't find player object |
| 1994 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 1995 | } else |
| 1996 | slot = -1; // all players |
| 1997 | if ((slot == -1) || (slot == Player_numcxx . . $ Player_num.)) |
| 1998 | D3MusicSetRegioncxx . . $ D3MusicSetRegion(472b8ebd11b2ca81).(mstruct->indexcxx . . $ msafe_struct#index.); |
| 1999 | if ((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && slot == Player_numcxx . . $ Player_num.) |
| 2000 | send_it = 0; |
| 2001 | mstruct->slotcxx . . $ msafe_struct#slot. = slot; // for send_to |
| 2002 | break; |
| 2003 | } |
| 2004 | case MSAFE_MISC_LEVELGOALcxx . . $ `scripts/osiris_common.h:889:9`!: |
| 2005 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`! && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 2006 | int v = 0xFFFFFFFF; |
| 2007 | Level_goalscxx . . $ Level_goals..GoalSetNamecxx . . $ levelgoals#GoalSetName(ceb9eed3194142b2).(mstruct->indexcxx . . $ msafe_struct#index., mstruct->messagecxx . . $ msafe_struct#message.); |
| 2008 | Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(mstruct->indexcxx . . $ msafe_struct#index., LO_CLEAR_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:35:9`!, &v); |
| 2009 | Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(mstruct->indexcxx . . $ msafe_struct#index., LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, &mstruct->typecxx . . $ msafe_struct#type.); |
| 2010 | Level_goalscxx . . $ Level_goals..GoalPrioritycxx . . $ levelgoals#GoalPriority(f3551096b2e9a55d).(mstruct->indexcxx . . $ msafe_struct#index., LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, &mstruct->countcxx . . $ msafe_struct#count.); |
| 2011 | } |
| 2012 | break; |
| 2013 | case MSAFE_MISC_WAYPOINTcxx . . $ `scripts/osiris_common.h:882:9`!: |
| 2014 | PlayerAddWaypointcxx . . $ PlayerAddWaypoint(d4f767463ce0a6b3).(mstruct->indexcxx . . $ msafe_struct#index.); |
| 2015 | break; |
| 2016 | case MSAFE_MISC_ENABLE_SHIPcxx . . $ `scripts/osiris_common.h:888:9`!: { |
| 2017 | PlayerSetShipPermissioncxx . . $ PlayerSetShipPermission(fb2bb0cf4ad3de37).(-1, mstruct->namecxx . . $ msafe_struct#name., (bool)(mstruct->statecxx . . $ msafe_struct#state. != 0)); |
| 2018 | } break; |
| 2019 | case MSAFE_MISC_FILTERED_HUD_MESSAGEcxx . . $ `scripts/osiris_common.h:891:9`!: |
| 2020 | case MSAFE_MISC_HUD_MESSAGEcxx . . $ `scripts/osiris_common.h:881:9`!: { |
| 2021 | int slot; |
| 2022 | if (mstruct->statecxx . . $ msafe_struct#state.) { // player specified |
| 2023 | slot = GetPlayerSlotcxx . . $ GetPlayerSlot(7864480464b09eea).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2024 | if (slot == -1) |
| 2025 | break; // couldn't find player object |
| 2026 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 2027 | } else |
| 2028 | slot = -1; // all players |
| 2029 | if ((slot == -1) || (slot == Player_numcxx . . $ Player_num.)) { |
| 2030 | char message[256]; |
| 2031 | bool gb = XlateGBMessagecxx . . $ XlateGBMessage(14223ed414283e68).(message, mstruct->messagecxx . . $ msafe_struct#message.); |
| 2032 | bool added; |
| 2033 | if (type == MSAFE_MISC_HUD_MESSAGEcxx . . $ `scripts/osiris_common.h:881:9`!) |
| 2034 | added = AddColoredHUDMessagecxx . . $ AddColoredHUDMessage(7778decf30f5fc42).(mstruct->colorcxx . . $ msafe_struct#color., "%s", message); // "%s" because message could contain % signs! |
| 2035 | else |
| 2036 | added = |
| 2037 | AddFilteredColoredHUDMessagecxx . . $ AddFilteredColoredHUDMessage(7778decf30f5fc42).(mstruct->colorcxx . . $ msafe_struct#color., "%s", message); // "%s" because message could contain % signs! |
| 2038 | if (gb && added) // If was GB message & was added, play the GB sound |
| 2039 | Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(7bec394c8d81705d).(FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).("GBotGreetB1"), SND_PRIORITY_HIGHESTcxx . . $ `sndlib/ssl_lib.h:282:9`!, 1.0); |
| 2040 | } |
| 2041 | if ((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && slot == Player_numcxx . . $ Player_num.) |
| 2042 | send_it = 0; |
| 2043 | mstruct->slotcxx . . $ msafe_struct#slot. = slot; // for send_to |
| 2044 | break; |
| 2045 | } |
| 2046 | case MSAFE_MISC_GAME_MESSAGEcxx . . $ `scripts/osiris_common.h:886:9`!: { |
| 2047 | int slot; |
| 2048 | if (mstruct->statecxx . . $ msafe_struct#state.) { // player specified |
| 2049 | slot = GetPlayerSlotcxx . . $ GetPlayerSlot(7864480464b09eea).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2050 | if (slot == -1) |
| 2051 | break; // couldn't find player object |
| 2052 | mstruct->objhandlecxx . . $ msafe_struct#objhandle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 2053 | } else |
| 2054 | slot = -1; // all players |
| 2055 | if ((slot == -1) || (slot == Player_numcxx . . $ Player_num.)) { |
| 2056 | AddGameMessagecxx . . $ AddGameMessage(85c52e162fed56f9).(mstruct->messagecxx . . $ msafe_struct#message.); |
| 2057 | char message2[256]; |
| 2058 | XlateGBMessagecxx . . $ XlateGBMessage(14223ed414283e68).(message2, mstruct->message2cxx . . $ msafe_struct#message2.); |
| 2059 | int y = Game_window_hcxx . . $ Game_window_h. / 4 - 15; |
| 2060 | if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 2061 | DemoWritePersistantHUDMessagecxx . . $ DemoWritePersistantHUDMessage(e60fbdfbe7e9abc2).(mstruct->colorcxx . . $ msafe_struct#color., HUD_MSG_PERSISTENT_CENTERcxx . . $ `Descent3/hud.h:312:9`!, y, 10.0, |
| 2062 | HPF_FADEOUTcxx . . $ `Descent3/hud.h:401:9`! + HPF_FREESPACE_DRAWcxx . . $ `Descent3/hud.h:402:9`!, SOUND_GAME_MESSAGEcxx . . $ `Descent3/sounds.h:148:9`!, message2); |
| 2063 | } |
| 2064 | if (Demo_flagscxx . . $ Demo_flags. != DF_PLAYBACKcxx . . $ `lib/demofile.h:123:9`!) { |
| 2065 | AddPersistentHUDMessagecxx . . $ AddPersistentHUDMessage(2c96e75cbf2ca747).(mstruct->colorcxx . . $ msafe_struct#color., HUD_MSG_PERSISTENT_CENTERcxx . . $ `Descent3/hud.h:312:9`!, y, 10.0, HPF_FADEOUTcxx . . $ `Descent3/hud.h:401:9`! + HPF_FREESPACE_DRAWcxx . . $ `Descent3/hud.h:402:9`!, |
| 2066 | SOUND_GAME_MESSAGEcxx . . $ `Descent3/sounds.h:148:9`!, message2); |
| 2067 | } |
| 2068 | } |
| 2069 | if ((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && slot == Player_numcxx . . $ Player_num.) |
| 2070 | send_it = 0; |
| 2071 | mstruct->slotcxx . . $ msafe_struct#slot. = slot; // for send_to |
| 2072 | break; |
| 2073 | } |
| 2074 | case MSAFE_MISC_END_LEVELcxx . . $ `scripts/osiris_common.h:883:9`!: |
| 2075 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) |
| 2076 | MultiEndLevelcxx . . $ MultiEndLevel(49f6e7a06ebc5aa8).(); |
| 2077 | else |
| 2078 | SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(mstruct->statecxx . . $ msafe_struct#state. ? GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND. : GAMESTATE_LVLFAILEDcxx . . $ GAMESTATE_LVLFAILED.); |
| 2079 | send_it = 0; |
| 2080 | break; |
| 2081 | case MSAFE_MISC_POPUP_CAMERAcxx . . $ `scripts/osiris_common.h:884:9`!: { |
| 2082 | CreateSmallViewcxx . . $ CreateSmallView(114097c446ee1c3e).(SVW_LEFTcxx . . $ `Descent3/SmallViews.h:72:9`!, mstruct->objhandlecxx . . $ msafe_struct#objhandle., SVF_POPUPcxx . . $ `Descent3/SmallViews.h:77:9`! + SVF_BIGGERcxx . . $ `Descent3/SmallViews.h:78:9`!, mstruct->intervalcxx . . $ msafe_struct#interval., |
| 2083 | D3_DEFAULT_ZOOMcxx . . $ `Descent3/descent.h:178:9`! / mstruct->scalarcxx . . $ msafe_struct#scalar., mstruct->gunpointcxx . . $ msafe_struct#gunpoint.); |
| 2084 | break; |
| 2085 | } |
| 2086 | case MSAFE_MISC_CLOSE_POPUPcxx . . $ `scripts/osiris_common.h:885:9`!: |
| 2087 | ClosePopupViewcxx . . $ ClosePopupView(d4f767463ce0a6b3).(SVW_LEFTcxx . . $ `Descent3/SmallViews.h:72:9`!); |
| 2088 | break; |
| 2089 | case MSAFE_MISC_GUIDEBOT_NAMEcxx . . $ `scripts/osiris_common.h:890:9`!: { |
| 2090 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2091 | if (objp && objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! && objp->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) { |
| 2092 | Current_pilotcxx . . $ Current_pilot..set_guidebot_namecxx . . $ pilot#set_guidebot_name(fda57c8427c60377).(mstruct->namecxx . . $ msafe_struct#name.); |
| 2093 | } |
| 2094 | } break; |
| 2095 | case MSAFE_MISC_START_TIMERcxx . . $ `scripts/osiris_common.h:892:9`!: { |
| 2096 | extern void RenderHUDTimercxx . . $ RenderHUDTimer(c7a20e4e05358911).(tHUDItemcxx . . $ tHUDItem# * item); |
| 2097 | int Osiris_GetTimerHandlecxx . . $ Osiris_GetTimerHandle(7864480464b09eea).(int id); |
| 2098 | int handle = Osiris_GetTimerHandlecxx . . $ Osiris_GetTimerHandle(7864480464b09eea).(mstruct->indexcxx . . $ msafe_struct#index.); |
| 2099 | if (handle == 0) |
| 2100 | return; |
| 2101 | tHUDItemcxx . . $ tHUDItem# huditem; |
| 2102 | memset(&huditem, 0, sizeof(huditem)); |
| 2103 | huditem.alphacxx . . $ tHUDItem#alpha. = HUD_ALPHAcxx . . $ `Descent3/hud.h:308:9`!; |
| 2104 | huditem.colorcxx . . $ tHUDItem#color. = mstruct->colorcxx . . $ msafe_struct#color.; |
| 2105 | huditem.typecxx . . $ tHUDItem#type. = HUD_ITEM_TIMERcxx . . $ `Descent3/hud.h:446:9`!; |
| 2106 | huditem.xcxx . . $ tHUDItem#x. = 0; |
| 2107 | huditem.ycxx . . $ tHUDItem#y. = 0; |
| 2108 | huditem.datacxx . . $ tHUDItem#data..timer_handlecxx . . $ tHUDItem#$anonymous_type_1#timer_handle. = handle; |
| 2109 | huditem.statcxx . . $ tHUDItem#stat. = STAT_CUSTOMcxx . . $ `Descent3/hud.h:287:9`!; |
| 2110 | huditem.flagscxx . . $ tHUDItem#flags. = HUD_FLAG_LEVELcxx . . $ `Descent3/hud.h:451:9`!; |
| 2111 | huditem.render_fncxx . . $ tHUDItem#render_fn. = RenderHUDTimercxx . . $ RenderHUDTimer(c7a20e4e05358911).; |
| 2112 | AddHUDItemcxx . . $ AddHUDItem(c7a20e4e05358911).(&huditem); |
| 2113 | send_it = 0; |
| 2114 | break; |
| 2115 | } |
| 2116 | case MSAFE_MISC_UPDATE_HUD_ITEMcxx . . $ `scripts/osiris_common.h:894:9`!: |
| 2117 | // If item not added yet, add it now |
| 2118 | if (FindCustomtext2HUDItemcxx . . $ FindCustomtext2HUDItem(b126dc7c1de90089).() == -1) { |
| 2119 | tHUDItemcxx . . $ tHUDItem# huditem; |
| 2120 | memset(&huditem, 0, sizeof(huditem)); |
| 2121 | huditem.alphacxx . . $ tHUDItem#alpha. = HUD_ALPHAcxx . . $ `Descent3/hud.h:308:9`!; |
| 2122 | huditem.colorcxx . . $ tHUDItem#color. = mstruct->colorcxx . . $ msafe_struct#color.; |
| 2123 | huditem.typecxx . . $ tHUDItem#type. = HUD_ITEM_CUSTOMTEXT2cxx . . $ `Descent3/hud.h:447:9`!; |
| 2124 | huditem.xcxx . . $ tHUDItem#x. = 0; |
| 2125 | huditem.ycxx . . $ tHUDItem#y. = 0; |
| 2126 | huditem.buffer_sizecxx . . $ tHUDItem#buffer_size. = MSAFE_MESSAGE_LENGTHcxx . . $ `scripts/osiris_common.h:1219:9`!; |
| 2127 | huditem.statcxx . . $ tHUDItem#stat. = STAT_CUSTOMcxx . . $ `Descent3/hud.h:287:9`!; |
| 2128 | huditem.flagscxx . . $ tHUDItem#flags. = HUD_FLAG_LEVELcxx . . $ `Descent3/hud.h:451:9`!; |
| 2129 | huditem.render_fncxx . . $ tHUDItem#render_fn. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2130 | AddHUDItemcxx . . $ AddHUDItem(c7a20e4e05358911).(&huditem); |
| 2131 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(FindCustomtext2HUDItem() != -1); |
| 2132 | } |
| 2133 | UpdateCustomtext2HUDItemcxx . . $ UpdateCustomtext2HUDItem(fda57c8427c60377).(mstruct->messagecxx . . $ msafe_struct#message.); |
| 2134 | break; |
| 2135 | case MSAFE_DOOR_LOCK_STATEcxx . . $ `scripts/osiris_common.h:873:9`!: |
| 2136 | DoorwayLockUnlockcxx . . $ DoorwayLockUnlock(918ebd27a9ddbad3).(mstruct->objhandlecxx . . $ msafe_struct#objhandle., (mstruct->statecxx . . $ msafe_struct#state. != 0)); |
| 2137 | break; |
| 2138 | case MSAFE_DOOR_ACTIVATEcxx . . $ `scripts/osiris_common.h:874:9`!: |
| 2139 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[mstruct->objhandle & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!].type == OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!); |
| 2140 | DoorwayActivatecxx . . $ DoorwayActivate(d4f767463ce0a6b3).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2141 | break; |
| 2142 | case MSAFE_DOOR_STOPcxx . . $ `scripts/osiris_common.h:876:9`!: |
| 2143 | DoorwayStopcxx . . $ DoorwayStop(d4f767463ce0a6b3).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2144 | break; |
| 2145 | case MSAFE_DOOR_POSITIONcxx . . $ `scripts/osiris_common.h:875:9`!: |
| 2146 | DoorwaySetPositioncxx . . $ DoorwaySetPosition(43c79ee2f1b9aefe).(mstruct->objhandlecxx . . $ msafe_struct#objhandle., mstruct->scalarcxx . . $ msafe_struct#scalar.); |
| 2147 | break; |
| 2148 | case MSAFE_TRIGGER_SETcxx . . $ `scripts/osiris_common.h:879:9`!: |
| 2149 | TriggerSetStatecxx . . $ TriggerSetState(918ebd27a9ddbad3).(mstruct->trigger_numcxx . . $ msafe_struct#trigger_num., (mstruct->statecxx . . $ msafe_struct#state. != 0)); |
| 2150 | send_it = 0; |
| 2151 | break; |
| 2152 | case MSAFE_INVEN_ADD_OBJECTcxx . . $ `scripts/osiris_common.h:902:9`!: { |
| 2153 | objectcxx . . $ object# *player = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2154 | objectcxx . . $ object# *item = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->ithandlecxx . . $ msafe_struct#ithandle.); |
| 2155 | bool ret = false; |
| 2156 | |
| 2157 | send_it = 0; |
| 2158 | if (player && item && (player->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 2159 | int slot = player->idcxx . . $ object#id.; |
| 2160 | ret = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..AddObjectcxx . . $ Inventory#AddObject(bc9c4eeb54e60257).(item->handlecxx . . $ object#handle., mstruct->flagscxx . . $ msafe_struct#flags., |
| 2161 | (mstruct->messagecxx . . $ msafe_struct#message.[0] != '\0') ? mstruct->messagecxx . . $ msafe_struct#message. : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2162 | if (ret) |
| 2163 | send_it = 1; |
| 2164 | } |
| 2165 | } break; |
| 2166 | case MSAFE_INVEN_REMOVE_OBJECTcxx . . $ `scripts/osiris_common.h:904:9`!: { |
| 2167 | objectcxx . . $ object# *player = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2168 | objectcxx . . $ object# *item = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->ithandlecxx . . $ msafe_struct#ithandle.); |
| 2169 | mstruct->statecxx . . $ msafe_struct#state. = false; |
| 2170 | send_it = 0; |
| 2171 | if (player && item && (player->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 2172 | int slot = player->idcxx . . $ object#id.; |
| 2173 | mstruct->statecxx . . $ msafe_struct#state. = Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Removecxx . . $ Inventory#Remove(cf9ef193275fa6d8).(item->handlecxx . . $ object#handle., -1); |
| 2174 | if (mstruct->statecxx . . $ msafe_struct#state.) |
| 2175 | send_it = 1; |
| 2176 | } |
| 2177 | } break; |
| 2178 | case MSAFE_INVEN_ADD_TYPE_IDcxx . . $ `scripts/osiris_common.h:896:9`!: { |
| 2179 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2180 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 2181 | int slot = objp->idcxx . . $ object#id.; |
| 2182 | |
| 2183 | if (mstruct->typecxx . . $ msafe_struct#type. == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 2184 | Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..Addcxx . . $ Inventory#Add(122d808d8b1091da).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, -1, -1, mstruct->flagscxx . . $ msafe_struct#flags.); |
| 2185 | else |
| 2186 | Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, -1, -1, mstruct->flagscxx . . $ msafe_struct#flags.); |
| 2187 | } |
| 2188 | break; |
| 2189 | } |
| 2190 | case MSAFE_INVEN_REMOVEcxx . . $ `scripts/osiris_common.h:899:9`!: |
| 2191 | case MSAFE_COUNTERMEASURE_REMOVEcxx . . $ `scripts/osiris_common.h:909:9`!: { |
| 2192 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2193 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 2194 | int slot = objp->idcxx . . $ object#id.; |
| 2195 | if (type == MSAFE_COUNTERMEASURE_REMOVEcxx . . $ `scripts/osiris_common.h:909:9`!) |
| 2196 | mstruct->typecxx . . $ msafe_struct#type. = OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!; |
| 2197 | |
| 2198 | if (mstruct->typecxx . . $ msafe_struct#type. == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 2199 | Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..Removecxx . . $ Inventory#Remove(cf9ef193275fa6d8).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id.); |
| 2200 | else |
| 2201 | Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Removecxx . . $ Inventory#Remove(cf9ef193275fa6d8).(mstruct->typecxx . . $ msafe_struct#type., mstruct->idcxx . . $ msafe_struct#id.); |
| 2202 | } |
| 2203 | break; |
| 2204 | } |
| 2205 | case MSAFE_COUNTERMEASURE_ADDcxx . . $ `scripts/osiris_common.h:906:9`!: { |
| 2206 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2207 | if (objp && (objp->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!)) { |
| 2208 | int slot = objp->idcxx . . $ object#id.; |
| 2209 | int total = 0; |
| 2210 | if (mstruct->countcxx . . $ msafe_struct#count. > 0) { |
| 2211 | int id = FindWeaponNamecxx . . $ FindWeaponName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(mstruct->name)); |
| 2212 | if (id != -1) { |
| 2213 | for (int i = 0; i < mstruct->countcxx . . $ msafe_struct#count.; i++) { |
| 2214 | if (Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..Addcxx . . $ Inventory#Add(122d808d8b1091da).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, id, objp, mstruct->aux_typecxx . . $ msafe_struct#aux_type., mstruct->aux_idcxx . . $ msafe_struct#aux_id.)) { |
| 2215 | total++; |
| 2216 | } |
| 2217 | } |
| 2218 | } |
| 2219 | } |
| 2220 | mstruct->countcxx . . $ msafe_struct#count. = total; |
| 2221 | if (total) |
| 2222 | send_it = 1; |
| 2223 | else |
| 2224 | send_it = 0; |
| 2225 | } |
| 2226 | } break; |
| 2227 | case MSAFE_OBJECT_ROTDRAGcxx . . $ `scripts/osiris_common.h:835:9`!: { |
| 2228 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2229 | if (objp) { |
| 2230 | objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotdragcxx . . $ physics_info#rotdrag. = mstruct->rot_dragcxx . . $ msafe_struct#rot_drag.; |
| 2231 | send_it = false; |
| 2232 | } else { |
| 2233 | return; |
| 2234 | } |
| 2235 | } break; |
| 2236 | case MSAFE_OBJECT_TYPEcxx . . $ `scripts/osiris_common.h:812:9`!: { |
| 2237 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2238 | if (objp) { |
| 2239 | objp->typecxx . . $ object#type. = mstruct->typecxx . . $ msafe_struct#type.; |
| 2240 | } else { |
| 2241 | return; |
| 2242 | } |
| 2243 | } break; |
| 2244 | case MSAFE_OBJECT_IDcxx . . $ `scripts/osiris_common.h:813:9`!: { |
| 2245 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2246 | if (objp) { |
| 2247 | objp->idcxx . . $ object#id. = mstruct->idcxx . . $ msafe_struct#id.; |
| 2248 | } else { |
| 2249 | return; |
| 2250 | } |
| 2251 | } break; |
| 2252 | case MSAFE_OBJECT_CONTROL_TYPEcxx . . $ `scripts/osiris_common.h:829:9`!: { |
| 2253 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2254 | if (objp && !(objp->flagscxx . . $ object#flags. & OF_DYINGcxx . . $ `Descent3/object_external.h:282:9`!)) { |
| 2255 | objp->control_typecxx . . $ object#control_type. = mstruct->control_typecxx . . $ msafe_struct#control_type.; |
| 2256 | } else { |
| 2257 | return; |
| 2258 | } |
| 2259 | } break; |
| 2260 | case MSAFE_OBJECT_FLAGScxx . . $ `scripts/osiris_common.h:827:9`!: { |
| 2261 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2262 | if (objp) { |
| 2263 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`! && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 2264 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(objp->flags & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!); |
| 2265 | } |
| 2266 | if (objp->flagscxx . . $ object#flags. != (uint32_tcxx . . $ uint32_t#)mstruct->flagscxx . . $ msafe_struct#flags.) { |
| 2267 | objp->flagscxx . . $ object#flags. = mstruct->flagscxx . . $ msafe_struct#flags.; |
| 2268 | } else { |
| 2269 | send_it = false; |
| 2270 | } |
| 2271 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`! && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 2272 | objp->flagscxx . . $ object#flags. |= OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!; |
| 2273 | } |
| 2274 | } else { |
| 2275 | return; |
| 2276 | } |
| 2277 | } break; |
| 2278 | case MSAFE_OBJECT_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:830:9`!: { |
| 2279 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2280 | if (objp) { |
| 2281 | objp->movement_typecxx . . $ object#movement_type. = mstruct->movement_typecxx . . $ msafe_struct#movement_type.; |
| 2282 | } else { |
| 2283 | return; |
| 2284 | } |
| 2285 | } break; |
| 2286 | case MSAFE_OBJECT_CREATION_TIMEcxx . . $ `scripts/osiris_common.h:831:9`!: { |
| 2287 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2288 | if (objp) { |
| 2289 | objp->creation_timecxx . . $ object#creation_time. = mstruct->creation_timecxx . . $ msafe_struct#creation_time.; |
| 2290 | } else { |
| 2291 | return; |
| 2292 | } |
| 2293 | } break; |
| 2294 | case MSAFE_OBJECT_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:833:9`!: { |
| 2295 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2296 | if (objp) { |
| 2297 | if (objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. != (uint32_tcxx . . $ uint32_t#)mstruct->physics_flagscxx . . $ msafe_struct#physics_flags.) { |
| 2298 | objp->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. = mstruct->physics_flagscxx . . $ msafe_struct#physics_flags.; |
| 2299 | objp->change_flagscxx . . $ object#change_flags. |= OCF_PHYS_FLAGScxx . . $ `Descent3/multi_world_state.h:68:9`!; |
| 2300 | } else { |
| 2301 | send_it = false; |
| 2302 | } |
| 2303 | } else { |
| 2304 | return; |
| 2305 | } |
| 2306 | } break; |
| 2307 | case MSAFE_OBJECT_PARENTcxx . . $ `scripts/osiris_common.h:834:9`!: { |
| 2308 | objectcxx . . $ object# *objp = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2309 | if (objp) { |
| 2310 | objp->parent_handlecxx . . $ object#parent_handle. = mstruct->ithandlecxx . . $ msafe_struct#ithandle.; |
| 2311 | } else { |
| 2312 | return; |
| 2313 | } |
| 2314 | } break; |
| 2315 | |
| 2316 | case MSAFE_WEAPON_CHECKcxx . . $ `scripts/osiris_common.h:913:9`!: |
| 2317 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // hmmmm |
| 2318 | break; |
| 2319 | case MSAFE_WEAPON_ADDcxx . . $ `scripts/osiris_common.h:914:9`!: { |
| 2320 | // add/subtract ammo/weapons from a player |
| 2321 | // if count>0 and the player doesn't have the weapon it will be added |
| 2322 | // objhandle: the player |
| 2323 | // index: the weapon |
| 2324 | // state: if the weapon is a secondary: |
| 2325 | // 1: remove weapon if ammo<=0 |
| 2326 | // 0: do nothing to the weapon |
| 2327 | // if the weapon is a primary |
| 2328 | // 1: remove weapon if count==0 |
| 2329 | // 0: do nothing to the weapon |
| 2330 | // count: ammo (if it's an ammo/secondary) of the weapon |
| 2331 | objectcxx . . $ object# *player = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2332 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(mstruct->index >= 0 && mstruct->index < MAX_PRIMARY_WEAPONScxx . . $ `Descent3/weapon.h:202:9`! + MAX_SECONDARY_WEAPONScxx . . $ `Descent3/weapon.h:203:9`!); |
| 2333 | if (player && player->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 2334 | shipcxx . . $ ship# *ship = &Shipscxx . . $ Ships.[Playerscxx . . $ Players.[player->idcxx . . $ object#id.].ship_indexcxx . . $ player#ship_index.]; |
| 2335 | otype_wb_infocxx . . $ otype_wb_info# *wb = &ship->static_wbcxx . . $ ship#static_wb.[mstruct->indexcxx . . $ msafe_struct#index.]; |
| 2336 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(wb != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2337 | // check if the player has the weapon |
| 2338 | bool have_weapon = PlayerHasWeaponcxx . . $ PlayerHasWeapon(cf9ef193275fa6d8).(player->idcxx . . $ object#id., mstruct->indexcxx . . $ msafe_struct#index.); |
| 2339 | if (!have_weapon && mstruct->countcxx . . $ msafe_struct#count. <= 0) { |
| 2340 | // nothing to do |
| 2341 | return; |
| 2342 | } |
| 2343 | if (mstruct->countcxx . . $ msafe_struct#count. > 0) { |
| 2344 | bool is_ammo = false; |
| 2345 | if ((mstruct->indexcxx . . $ msafe_struct#index. >= SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) || wb->ammo_usagecxx . . $ otype_wb_info#ammo_usage.) { |
| 2346 | is_ammo = true; |
| 2347 | } |
| 2348 | // we're going to give the player the weapon and ammo (if needed) |
| 2349 | if (!have_weapon) { |
| 2350 | AddWeaponToPlayercxx . . $ AddWeaponToPlayer(2326284602b0bb2d).(player->idcxx . . $ object#id., mstruct->indexcxx . . $ msafe_struct#index., (is_ammo) ? mstruct->countcxx . . $ msafe_struct#count. : 0); |
| 2351 | // thats it! |
| 2352 | return; |
| 2353 | } |
| 2354 | // ok, the player already has this weapon, add some ammo if ammo weapon |
| 2355 | int old_ammo = Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_ammocxx . . $ player#weapon_ammo.[mstruct->indexcxx . . $ msafe_struct#index.]; |
| 2356 | int added = 1; |
| 2357 | // now add ammo if necessary |
| 2358 | if (is_ammo) { |
| 2359 | added = AddWeaponAmmocxx . . $ AddWeaponAmmo(2326284602b0bb2d).(player->idcxx . . $ object#id., mstruct->indexcxx . . $ msafe_struct#index., mstruct->countcxx . . $ msafe_struct#count.); |
| 2360 | } |
| 2361 | if (added > 0 && player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num. && old_ammo == 0) { |
| 2362 | CheckForWeaponSelectcxx . . $ CheckForWeaponSelect(3e454b8ccf442868).(player->idcxx . . $ object#id., mstruct->indexcxx . . $ msafe_struct#index.); |
| 2363 | } |
| 2364 | } else { |
| 2365 | bool weap_removed = false; |
| 2366 | int type; |
| 2367 | // we're going to remove the weapon/ammo |
| 2368 | if (mstruct->indexcxx . . $ msafe_struct#index. >= SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) { |
| 2369 | type = PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!; |
| 2370 | // remove ammo |
| 2371 | Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_ammocxx . . $ player#weapon_ammo.[mstruct->indexcxx . . $ msafe_struct#index.] += mstruct->countcxx . . $ msafe_struct#count.; |
| 2372 | if (Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_ammocxx . . $ player#weapon_ammo.[mstruct->indexcxx . . $ msafe_struct#index.] < 0) |
| 2373 | Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_ammocxx . . $ player#weapon_ammo.[mstruct->indexcxx . . $ msafe_struct#index.] = 0; |
| 2374 | if (Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_ammocxx . . $ player#weapon_ammo.[mstruct->indexcxx . . $ msafe_struct#index.] == 0) { |
| 2375 | weap_removed = true; |
| 2376 | if (mstruct->statecxx . . $ msafe_struct#state. == 1) { |
| 2377 | // remove weapon |
| 2378 | Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_flagscxx . . $ player#weapon_flags. &= ~HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(mstruct->index); |
| 2379 | } |
| 2380 | } |
| 2381 | } else { |
| 2382 | type = PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!; |
| 2383 | // remove the weapon |
| 2384 | if (mstruct->statecxx . . $ msafe_struct#state. == 1) { |
| 2385 | Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_flagscxx . . $ player#weapon_flags. &= ~HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(mstruct->index); |
| 2386 | weap_removed = true; |
| 2387 | } |
| 2388 | } |
| 2389 | if (weap_removed) { |
| 2390 | int curr_weapon_index = Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weaponcxx . . $ player#weapon.[type].indexcxx . . $ player_weapon#index.; |
| 2391 | if (curr_weapon_index == mstruct->indexcxx . . $ msafe_struct#index.) { |
| 2392 | // check autoselect |
| 2393 | if (player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) { |
| 2394 | bool select_new; |
| 2395 | |
| 2396 | select_new = AutoSelectWeaponcxx . . $ AutoSelectWeapon(cf9ef193275fa6d8).(type, -1); |
| 2397 | if (!select_new) { |
| 2398 | // AddHUDMessage ("%s",TXT(Static_weapon_names_msg[Players[player->id].weapon[type].index])); |
| 2399 | } |
| 2400 | } |
| 2401 | } |
| 2402 | } |
| 2403 | } |
| 2404 | } else { |
| 2405 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // come on it isn't even a player! |
| 2406 | } |
| 2407 | } break; |
| 2408 | default: |
| 2409 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // Illegal type passed to multisafe function |
| 2410 | break; |
| 2411 | } |
| 2412 | if (((Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) && send_it) || |
| 2413 | (send_it && (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!)) |
| 2414 | MultiSendMSafeFunctioncxx . . $ MultiSendMSafeFunction(6cc1e8e00715904d).(type, mstruct); |
| 2415 | } |
| 2416 | #define SHIELD_BONUScxx . . $ `Descent3/multisafe.cpp:2416:9`! 12.0f |
| 2417 | #define ENERGY_BONUScxx . . $ `Descent3/multisafe.cpp:2417:9`! 12.0f |
| 2418 | // Returns true if the player has this weapon (this fuction should be moved) |
| 2419 | bool PlayerHasWeaponcxx . . $ PlayerHasWeapon(cf9ef193275fa6d8).(int slot, int weapon_index) { |
| 2420 | if (Playerscxx . . $ Players.[slot].weapon_flagscxx . . $ player#weapon_flags. & HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(weapon_index)) |
| 2421 | if (weapon_index >= SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) |
| 2422 | return (Playerscxx . . $ Players.[slot].weapon_ammocxx . . $ player#weapon_ammo.[weapon_index] > 0); // have secondary only if have ammo |
| 2423 | else |
| 2424 | return true; // primaries don't check for ammo |
| 2425 | else |
| 2426 | return false; |
| 2427 | } |
| 2428 | // Adds weapon ammo to a player, returns 0 if it couldn't |
| 2429 | // This function should be moved! |
| 2430 | int AddWeaponAmmocxx . . $ AddWeaponAmmo(2326284602b0bb2d).(int slot, int weap_index, int ammo) { |
| 2431 | // Get pointer to the battery for this weapon |
| 2432 | playercxx . . $ player# *player = &Playerscxx . . $ Players.[slot]; |
| 2433 | shipcxx . . $ ship# *ship = &Shipscxx . . $ Ships.[player->ship_indexcxx . . $ player#ship_index.]; |
| 2434 | otype_wb_infocxx . . $ otype_wb_info# *wb = &ship->static_wbcxx . . $ ship#static_wb.[weap_index]; |
| 2435 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(wb != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2436 | // if secondary or primary that uses ammo, then use the ammo |
| 2437 | if ((weap_index >= SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) || wb->ammo_usagecxx . . $ otype_wb_info#ammo_usage.) { |
| 2438 | // figure out much ammo to add |
| 2439 | int added = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(ship->max_ammocxx . . $ ship#max_ammo.[weap_index] - player->weapon_ammocxx . . $ player#weapon_ammo.[weap_index], ammo); |
| 2440 | // now add it |
| 2441 | player->weapon_ammocxx . . $ player#weapon_ammo.[weap_index] += added; |
| 2442 | return added; |
| 2443 | } else // not an ammo-using weapon |
| 2444 | { |
| 2445 | Int3cxx . . $ `misc/pserror.h:247:9`!(); // trying to add ammo to something that doesn't take it |
| 2446 | return 0; |
| 2447 | } |
| 2448 | } |
| 2449 | bool AddPowerupEnergyToPlayercxx . . $ AddPowerupEnergyToPlayer(83c267b20bac841a).(int id) { |
| 2450 | if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) |
| 2451 | return false; |
| 2452 | float curr_energy = Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].energycxx . . $ player#energy.; |
| 2453 | if (Playerscxx . . $ Players.[id].energycxx . . $ player#energy. >= MAX_ENERGYcxx . . $ `Descent3/player_external.h:71:9`!) |
| 2454 | return false; |
| 2455 | float amount = 10.0f * Diff_general_scalarcxx . . $ Diff_general_scalar.[DIFF_LEVELcxx . . $ `Descent3/difficulty.h:29:9`!]; |
| 2456 | curr_energy = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).<float>(MAX_ENERGYcxx . . $ `Descent3/player_external.h:71:9`!, curr_energy + amount); |
| 2457 | Playerscxx . . $ Players.[id].energycxx . . $ player#energy. = curr_energy; |
| 2458 | return true; |
| 2459 | } |
| 2460 | // returns true if it was handled |
| 2461 | bool HandleCommonPowerupscxx . . $ HandleCommonPowerups(75a2683c3e634812).(char *pname, msafe_structcxx . . $ msafe_struct# *mstruct, uint8_tcxx . . $ uint8_t# *pickup); |
| 2462 | bool HandleWeaponPowerupscxx . . $ HandleWeaponPowerups(75a2683c3e634812).(char *pname, msafe_structcxx . . $ msafe_struct# *mstruct, uint8_tcxx . . $ uint8_t# *pickup); |
| 2463 | bool HandleCounterMeasurePowerupscxx . . $ HandleCounterMeasurePowerups(75a2683c3e634812).(char *pname, msafe_structcxx . . $ msafe_struct# *mstruct, uint8_tcxx . . $ uint8_t# *pickup); |
| 2464 | bool HandleInventoryPowerupscxx . . $ HandleInventoryPowerups(75a2683c3e634812).(char *pname, msafe_structcxx . . $ msafe_struct# *mstruct, uint8_tcxx . . $ uint8_t# *pickup); |
| 2465 | // Does whatever magic needs to be done to get the default powerups to work |
| 2466 | void msafe_DoPowerupcxx . . $ msafe_DoPowerup(6e76859aa63aa4ec).(msafe_structcxx . . $ msafe_struct# *mstruct) { |
| 2467 | char pname[255]; |
| 2468 | strcpy(pname, Object_infocxx . . $ Object_info.[MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.].namecxx . . $ object_info#name.); |
| 2469 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->type == OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!); |
| 2470 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 2471 | uint8_tcxx . . $ uint8_t# pickup = 0; |
| 2472 | // Now go through and do the magic for each powerup |
| 2473 | bool handled = false; |
| 2474 | handled = HandleCommonPowerupscxx . . $ HandleCommonPowerups(75a2683c3e634812).(pname, mstruct, &pickup); |
| 2475 | if (!handled) |
| 2476 | handled = HandleWeaponPowerupscxx . . $ HandleWeaponPowerups(75a2683c3e634812).(pname, mstruct, &pickup); |
| 2477 | if (!handled) |
| 2478 | handled = HandleCounterMeasurePowerupscxx . . $ HandleCounterMeasurePowerups(75a2683c3e634812).(pname, mstruct, &pickup); |
| 2479 | if (!handled) |
| 2480 | handled = HandleInventoryPowerupscxx . . $ HandleInventoryPowerups(75a2683c3e634812).(pname, mstruct, &pickup); |
| 2481 | if (!handled) |
| 2482 | return; |
| 2483 | // if (Game_mode & GM_MULTI && Netgame.local_role==LR_SERVER) |
| 2484 | //{ |
| 2485 | MultiSendMSafePowerupcxx . . $ MultiSendMSafePowerup(6e76859aa63aa4ec).(mstruct); |
| 2486 | //} |
| 2487 | |
| 2488 | // Now remove the object from the world |
| 2489 | if (pickup) { |
| 2490 | if (((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) && Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) || !(Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!)) { |
| 2491 | if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 2492 | // DemoWriteSetObjDead(MOBJ); |
| 2493 | } |
| 2494 | SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!, true, (bool)(mstruct->playsoundcxx . . $ msafe_struct#playsound. != 0)); |
| 2495 | Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(17f485224ada8dd7).(SOUND_POWERUP_PICKUPcxx . . $ `Descent3/sounds.h:116:9`!, SND_PRIORITY_HIGHcxx . . $ `sndlib/ssl_lib.h:283:9`!, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!); |
| 2496 | } |
| 2497 | } |
| 2498 | } |
| 2499 | // Data for primary powerups |
| 2500 | structcxx . . $ $anonymous_type_98fafd4806cc7515_0# { |
| 2501 | const char *namecxx . . $ $anonymous_type_98fafd4806cc7515_0#name.; |
| 2502 | int weapon_indexcxx . . $ $anonymous_type_98fafd4806cc7515_0#weapon_index.; |
| 2503 | int pickup_msgcxx . . $ $anonymous_type_98fafd4806cc7515_0#pickup_msg., already_have_msgcxx . . $ $anonymous_type_98fafd4806cc7515_0#already_have_msg., ammo_msgcxx . . $ $anonymous_type_98fafd4806cc7515_0#ammo_msg., full_msgcxx . . $ $anonymous_type_98fafd4806cc7515_0#full_msg.; |
| 2504 | } powerup_data_primarycxx . . $ powerup_data_primary.[] = { |
| 2505 | {"Vauss", VAUSS_INDEXcxx . . $ `Descent3/weapon_external.h:23:9`!, TXI_MSG_VAUSScxx . . $ `Descent3/stringtable.h:616:9`!, TXI_MSG_HAVEVAUSScxx . . $ `Descent3/stringtable.h:615:9`!, TXI_MSG_VAUSSAMMOcxx . . $ `Descent3/stringtable.h:657:9`!, TXI_MSG_VAUSSFULLcxx . . $ `Descent3/stringtable.h:658:9`!}, |
| 2506 | {"Napalm", NAPALM_INDEXcxx . . $ `Descent3/weapon_external.h:29:9`!, TXI_MSG_NAPALMcxx . . $ `Descent3/stringtable.h:618:9`!, TXI_MSG_NAPALMHAVEcxx . . $ `Descent3/stringtable.h:617:9`!, TXI_MSG_NAPALMFUELcxx . . $ `Descent3/stringtable.h:661:9`!, TXI_MSG_NAPALMFULLcxx . . $ `Descent3/stringtable.h:662:9`!}, |
| 2507 | {"EMDlauncher", EMD_INDEXcxx . . $ `Descent3/weapon_external.h:30:9`!, TXI_MSG_EMDcxx . . $ `Descent3/stringtable.h:620:9`!, TXI_MSG_EMDALREADYHAVEcxx . . $ `Descent3/stringtable.h:619:9`!, -1, -1}, |
| 2508 | {"Microwave", MICROWAVE_INDEXcxx . . $ `Descent3/weapon_external.h:24:9`!, TXI_MSG_MICROWAVEcxx . . $ `Descent3/stringtable.h:622:9`!, TXI_MSG_MICROWAVEHAVEcxx . . $ `Descent3/stringtable.h:621:9`!, -1, -1}, |
| 2509 | {"MassDriver", MASSDRIVER_INDEXcxx . . $ `Descent3/weapon_external.h:28:9`!, TXI_MSG_MASSDRIVERcxx . . $ `Descent3/stringtable.h:624:9`!, TXI_MSG_MASSALREADYHAVEcxx . . $ `Descent3/stringtable.h:623:9`!, TXI_MSG_MASSAMMOcxx . . $ `Descent3/stringtable.h:659:9`!, TXI_MSG_MASSFULLcxx . . $ `Descent3/stringtable.h:660:9`!}, |
| 2510 | {"SuperLaser", SUPER_LASER_INDEXcxx . . $ `Descent3/weapon_external.h:27:9`!, TXI_MSG_SUPERLASERcxx . . $ `Descent3/stringtable.h:626:9`!, TXI_MSG_SUPERLHAVEcxx . . $ `Descent3/stringtable.h:625:9`!, -1, -1}, |
| 2511 | {"Plasmacannon", PLASMA_INDEXcxx . . $ `Descent3/weapon_external.h:25:9`!, TXI_MSG_PLASMAcxx . . $ `Descent3/stringtable.h:628:9`!, TXI_MSG_PLASMAHAVEcxx . . $ `Descent3/stringtable.h:627:9`!, -1, -1}, |
| 2512 | {"Fusioncannon", FUSION_INDEXcxx . . $ `Descent3/weapon_external.h:26:9`!, TXI_MSG_FUSIONcxx . . $ `Descent3/stringtable.h:630:9`!, TXI_MSG_FUSIONHAVEcxx . . $ `Descent3/stringtable.h:629:9`!, -1, -1}, |
| 2513 | {"Omegacannon", OMEGA_INDEXcxx . . $ `Descent3/weapon_external.h:31:9`!, TXI_MSG_OMEGAcxx . . $ `Descent3/stringtable.h:632:9`!, TXI_MSG_OMEGAHAVEcxx . . $ `Descent3/stringtable.h:631:9`!, -1, -1}, |
| 2514 | }; |
| 2515 | #define NUM_POWERUP_TYPES_PRIMARYcxx . . $ `Descent3/multisafe.cpp:2515:9`! (sizeof(powerup_data_primary) / sizeof(*powerup_data_primary)) |
| 2516 | structcxx . . $ $anonymous_type_98fafd4806cc7515_1# { |
| 2517 | const char *namecxx . . $ $anonymous_type_98fafd4806cc7515_1#name.; |
| 2518 | int weapon_indexcxx . . $ $anonymous_type_98fafd4806cc7515_1#weapon_index.; |
| 2519 | int added_one_msgcxx . . $ $anonymous_type_98fafd4806cc7515_1#added_one_msg., added_multi_msgcxx . . $ $anonymous_type_98fafd4806cc7515_1#added_multi_msg., full_msgcxx . . $ $anonymous_type_98fafd4806cc7515_1#full_msg.; |
| 2520 | } powerup_data_secondarycxx . . $ powerup_data_secondary.[] = { |
| 2521 | {"Frag", FRAG_INDEXcxx . . $ `Descent3/weapon_external.h:37:9`!, TXI_MSG_FRAGcxx . . $ `Descent3/stringtable.h:633:9`!, -1, TXI_MSG_FRAGFULLcxx . . $ `Descent3/stringtable.h:634:9`!}, |
| 2522 | {"ImpactMortar", IMPACTMORTAR_INDEXcxx . . $ `Descent3/weapon_external.h:34:9`!, TXI_MSG_IMPACTMcxx . . $ `Descent3/stringtable.h:635:9`!, -1, TXI_MSG_IMPACTMFULLcxx . . $ `Descent3/stringtable.h:636:9`!}, |
| 2523 | {"NapalmRocket", NAPALMROCKET_INDEXcxx . . $ `Descent3/weapon_external.h:39:9`!, TXI_MSG_NAPALMRcxx . . $ `Descent3/stringtable.h:637:9`!, -1, TXI_MSG_NAPALMRFULLcxx . . $ `Descent3/stringtable.h:638:9`!}, |
| 2524 | {"Cyclone", CYCLONE_INDEXcxx . . $ `Descent3/weapon_external.h:40:9`!, TXI_MSG_CYCLONEcxx . . $ `Descent3/stringtable.h:639:9`!, -1, TXI_MSG_CYCLONEFULLcxx . . $ `Descent3/stringtable.h:640:9`!}, |
| 2525 | {"BlackShark", BLACKSHARK_INDEXcxx . . $ `Descent3/weapon_external.h:41:9`!, TXI_MSG_BSHARKcxx . . $ `Descent3/stringtable.h:641:9`!, -1, TXI_MSG_BSHARKFULLcxx . . $ `Descent3/stringtable.h:642:9`!}, |
| 2526 | {"Concussion", CONCUSSION_INDEXcxx . . $ `Descent3/weapon_external.h:32:9`!, TXI_MSG_CONCcxx . . $ `Descent3/stringtable.h:643:9`!, -1, TXI_MSG_CONCFULLcxx . . $ `Descent3/stringtable.h:644:9`!}, |
| 2527 | {"Homing", HOMING_INDEXcxx . . $ `Descent3/weapon_external.h:33:9`!, TXI_MSG_HOMINGcxx . . $ `Descent3/stringtable.h:645:9`!, -1, TXI_MSG_HOMINGFULLcxx . . $ `Descent3/stringtable.h:646:9`!}, |
| 2528 | {"Smart", SMART_INDEXcxx . . $ `Descent3/weapon_external.h:35:9`!, TXI_MSG_SMARTcxx . . $ `Descent3/stringtable.h:647:9`!, -1, TXI_MSG_SMARTFULLcxx . . $ `Descent3/stringtable.h:648:9`!}, |
| 2529 | {"Mega", MEGA_INDEXcxx . . $ `Descent3/weapon_external.h:36:9`!, TXI_MSG_MEGAcxx . . $ `Descent3/stringtable.h:649:9`!, -1, TXI_MSG_MEGAFULLcxx . . $ `Descent3/stringtable.h:650:9`!}, |
| 2530 | {"Guided", GUIDED_INDEXcxx . . $ `Descent3/weapon_external.h:38:9`!, TXI_MSG_GUIDEDcxx . . $ `Descent3/stringtable.h:651:9`!, -1, TXI_MSG_GUIDEDFULLcxx . . $ `Descent3/stringtable.h:652:9`!}, |
| 2531 | {"4PackHoming", HOMING_INDEXcxx . . $ `Descent3/weapon_external.h:33:9`!, TXI_MSG_HOMINGcxx . . $ `Descent3/stringtable.h:645:9`!, TXI_MSG_MULTI_HOMINGcxx . . $ `Descent3/stringtable.h:653:9`!, TXI_MSG_HOMINGFULLcxx . . $ `Descent3/stringtable.h:646:9`!}, |
| 2532 | {"4PackConc", CONCUSSION_INDEXcxx . . $ `Descent3/weapon_external.h:32:9`!, TXI_MSG_CONCcxx . . $ `Descent3/stringtable.h:643:9`!, TXI_MSG_MULTI_CONCcxx . . $ `Descent3/stringtable.h:654:9`!, TXI_MSG_CONCFULLcxx . . $ `Descent3/stringtable.h:644:9`!}, |
| 2533 | {"4PackFrag", FRAG_INDEXcxx . . $ `Descent3/weapon_external.h:37:9`!, TXI_MSG_FRAGcxx . . $ `Descent3/stringtable.h:633:9`!, TXI_MSG_MULTI_FRAGcxx . . $ `Descent3/stringtable.h:655:9`!, TXI_MSG_FRAGFULLcxx . . $ `Descent3/stringtable.h:634:9`!}, |
| 2534 | {"4PackGuided", GUIDED_INDEXcxx . . $ `Descent3/weapon_external.h:38:9`!, TXI_MSG_GUIDEDcxx . . $ `Descent3/stringtable.h:651:9`!, TXI_MSG_MULTI_GUIDEDcxx . . $ `Descent3/stringtable.h:656:9`!, TXI_MSG_GUIDEDFULLcxx . . $ `Descent3/stringtable.h:652:9`!}, |
| 2535 | }; |
| 2536 | #define NUM_POWERUP_TYPES_SECONDARYcxx . . $ `Descent3/multisafe.cpp:2536:9`! (sizeof(powerup_data_secondary) / sizeof(*powerup_data_secondary)) |
| 2537 | structcxx . . $ $anonymous_type_98fafd4806cc7515_2# { |
| 2538 | const char *namecxx . . $ $anonymous_type_98fafd4806cc7515_2#name.; |
| 2539 | int weapon_indexcxx . . $ $anonymous_type_98fafd4806cc7515_2#weapon_index.; |
| 2540 | int ammo_msgcxx . . $ $anonymous_type_98fafd4806cc7515_2#ammo_msg., full_msgcxx . . $ $anonymous_type_98fafd4806cc7515_2#full_msg.; |
| 2541 | } powerup_data_ammocxx . . $ powerup_data_ammo.[] = {{"Vauss clip", VAUSS_INDEXcxx . . $ `Descent3/weapon_external.h:23:9`!, TXI_MSG_VAUSSAMMOcxx . . $ `Descent3/stringtable.h:657:9`!, TXI_MSG_VAUSSFULLcxx . . $ `Descent3/stringtable.h:658:9`!}, |
| 2542 | {"MassDriverAmmo", MASSDRIVER_INDEXcxx . . $ `Descent3/weapon_external.h:28:9`!, TXI_MSG_MASSAMMOcxx . . $ `Descent3/stringtable.h:659:9`!, TXI_MSG_MASSFULLcxx . . $ `Descent3/stringtable.h:660:9`!}, |
| 2543 | {"NapalmTank", NAPALM_INDEXcxx . . $ `Descent3/weapon_external.h:29:9`!, TXI_MSG_NAPALMFUELcxx . . $ `Descent3/stringtable.h:661:9`!, TXI_MSG_NAPALMFULLcxx . . $ `Descent3/stringtable.h:662:9`!}}; |
| 2544 | #define NUM_POWERUP_TYPES_AMMOcxx . . $ `Descent3/multisafe.cpp:2544:9`! (sizeof(powerup_data_ammo) / sizeof(*powerup_data_ammo)) |
| 2545 | void ShowAmmoAddedMessagecxx . . $ ShowAmmoAddedMessage(b1146eedae1e1d0b).(int weapon_index, int msg_index, int added) { |
| 2546 | int added_frac = 0; |
| 2547 | if (Shipscxx . . $ Ships.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].ship_indexcxx . . $ player#ship_index.].fire_flagscxx . . $ ship#fire_flags.[weapon_index] & SFF_TENTHScxx . . $ `Descent3/ship.h:133:9`!) { |
| 2548 | added_frac = added; |
| 2549 | while (added_frac >= 100) |
| 2550 | added_frac -= 100; |
| 2551 | while (added_frac >= 10) |
| 2552 | added_frac -= 10; |
| 2553 | added /= 10; |
| 2554 | } |
| 2555 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXTcxx . . $ `Descent3/stringtable.h:24:9`!(msg_index), added, added_frac); |
| 2556 | } |
| 2557 | // See if we should select the specified weapon |
| 2558 | void CheckForWeaponSelectcxx . . $ CheckForWeaponSelect(3e454b8ccf442868).(int id, int weapon_index) { |
| 2559 | if (id == Player_numcxx . . $ Player_num.) { |
| 2560 | bool select_new; |
| 2561 | if (weapon_index < SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!) |
| 2562 | select_new = AutoSelectWeaponcxx . . $ AutoSelectWeapon(cf9ef193275fa6d8).(PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!, weapon_index); |
| 2563 | else |
| 2564 | select_new = AutoSelectWeaponcxx . . $ AutoSelectWeapon(cf9ef193275fa6d8).(PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!, weapon_index); |
| 2565 | if (!select_new) { |
| 2566 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).("%s", TXTcxx . . $ `Descent3/stringtable.h:24:9`!(Static_weapon_names_msg[weapon_index])); |
| 2567 | } |
| 2568 | } |
| 2569 | } |
| 2570 | extern uint8_tcxx . . $ uint8_t# AutomapVisMapcxx . . $ AutomapVisMap.[MAX_ROOMScxx . . $ `Descent3/room.h:377:9`!]; |
| 2571 | // New spiffy table-based code |
| 2572 | bool HandleWeaponPowerupscxx . . $ HandleWeaponPowerups(75a2683c3e634812).(char *pname, msafe_structcxx . . $ msafe_struct# *mstruct, uint8_tcxx . . $ uint8_t# *pickup) { |
| 2573 | objectcxx . . $ object# *player = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->ithandlecxx . . $ msafe_struct#ithandle.); |
| 2574 | objectcxx . . $ object# *powerup = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(mstruct->objhandlecxx . . $ msafe_struct#objhandle.); |
| 2575 | int p; |
| 2576 | if (!player || !powerup) |
| 2577 | return 0; |
| 2578 | bool handled = false; |
| 2579 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(player->type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!); |
| 2580 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(powerup->control_type == CT_POWERUPcxx . . $ `Descent3/object_external.h:224:9`!); |
| 2581 | // Check the primaries |
| 2582 | for (p = 0; p < NUM_POWERUP_TYPES_PRIMARYcxx . . $ `Descent3/multisafe.cpp:2515:9`!; p++) { |
| 2583 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(powerup_data_primary[p].name, pname)) { |
| 2584 | handled = true; |
| 2585 | int weapon_index = powerup_data_primarycxx . . $ powerup_data_primary.[p].weapon_indexcxx . . $ $anonymous_type_98fafd4806cc7515_0#weapon_index.; |
| 2586 | if (!PlayerHasWeaponcxx . . $ PlayerHasWeapon(cf9ef193275fa6d8).(player->idcxx . . $ object#id., weapon_index)) { |
| 2587 | *pickup = 1; |
| 2588 | if (player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) |
| 2589 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXTcxx . . $ `Descent3/stringtable.h:24:9`!(powerup_data_primary[p].pickup_msg)); |
| 2590 | AddWeaponToPlayercxx . . $ AddWeaponToPlayer(2326284602b0bb2d).(player->idcxx . . $ object#id., weapon_index, powerup->ctypecxx . . $ object#ctype..powerup_infocxx . . $ object#$anonymous_type_9#powerup_info..countcxx . . $ powerup_info_s#count.); |
| 2591 | } else { // we already have this weapon |
| 2592 | // If multiplayer, don't do anything (except print the message), so only do stuff if not multiplayer |
| 2593 | if (!(Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!)) { |
| 2594 | // If this is an ammo weapon, give the player the ammo |
| 2595 | if (powerup->ctypecxx . . $ object#ctype..powerup_infocxx . . $ object#$anonymous_type_9#powerup_info..countcxx . . $ powerup_info_s#count. > 0) { |
| 2596 | int old_ammo = Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_ammocxx . . $ player#weapon_ammo.[weapon_index]; |
| 2597 | int added = AddWeaponAmmocxx . . $ AddWeaponAmmo(2326284602b0bb2d).(player->idcxx . . $ object#id., weapon_index, powerup->ctypecxx . . $ object#ctype..powerup_infocxx . . $ object#$anonymous_type_9#powerup_info..countcxx . . $ powerup_info_s#count.); |
| 2598 | if (added) { // got ammo, so remove powerup |
| 2599 | *pickup = 1; |
| 2600 | if (player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) { |
| 2601 | ShowAmmoAddedMessagecxx . . $ ShowAmmoAddedMessage(b1146eedae1e1d0b).(weapon_index, powerup_data_primarycxx . . $ powerup_data_primary.[p].ammo_msgcxx . . $ $anonymous_type_98fafd4806cc7515_0#ammo_msg., added); |
| 2602 | if (old_ammo == 0) |
| 2603 | CheckForWeaponSelectcxx . . $ CheckForWeaponSelect(3e454b8ccf442868).(player->idcxx . . $ object#id., weapon_index); |
| 2604 | } |
| 2605 | } else { // did not get ammo from powerup, so say full |
| 2606 | if (player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) |
| 2607 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXTcxx . . $ `Descent3/stringtable.h:24:9`!(powerup_data_primary[p].full_msg)); |
| 2608 | } |
| 2609 | } else { // not an ammo weapon (or has no ammo) |
| 2610 | // Give the player energy & remove powerup, if energy not full, |
| 2611 | if (AddPowerupEnergyToPlayercxx . . $ AddPowerupEnergyToPlayer(83c267b20bac841a).(player->idcxx . . $ object#id.)) |
| 2612 | *pickup = 1; |
| 2613 | } |
| 2614 | } else { |
| 2615 | if (player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) |
| 2616 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_ALREADY_HAVE_WEAPONcxx . . $ `Descent3/stringtable.h:804:9`!); |
| 2617 | } |
| 2618 | } |
| 2619 | } |
| 2620 | } |
| 2621 | // Check the secondaries |
| 2622 | for (p = 0; p < NUM_POWERUP_TYPES_SECONDARYcxx . . $ `Descent3/multisafe.cpp:2536:9`!; p++) { |
| 2623 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(powerup_data_secondary[p].name, pname)) { |
| 2624 | handled = true; |
| 2625 | int weapon_index = powerup_data_secondarycxx . . $ powerup_data_secondary.[p].weapon_indexcxx . . $ $anonymous_type_98fafd4806cc7515_1#weapon_index.; |
| 2626 | // Does the player have any now? |
| 2627 | bool has_weapon = PlayerHasWeaponcxx . . $ PlayerHasWeapon(cf9ef193275fa6d8).(player->idcxx . . $ object#id., weapon_index); |
| 2628 | // Determine how much to add |
| 2629 | int added = AddWeaponAmmocxx . . $ AddWeaponAmmo(2326284602b0bb2d).(player->idcxx . . $ object#id., weapon_index, powerup->ctypecxx . . $ object#ctype..powerup_infocxx . . $ object#$anonymous_type_9#powerup_info..countcxx . . $ powerup_info_s#count.); |
| 2630 | // Pickup powerup if multiplayer or if got any ammo from it |
| 2631 | *pickup = (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) || (added != 0); |
| 2632 | |
| 2633 | // Show message |
| 2634 | if (player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) { |
| 2635 | if (added > 1) { |
| 2636 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(powerup_data_secondary[p].added_multi_msg != -1); |
| 2637 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXTcxx . . $ `Descent3/stringtable.h:24:9`!(powerup_data_secondary[p].added_multi_msg), added); |
| 2638 | } else if (added == 1) |
| 2639 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXTcxx . . $ `Descent3/stringtable.h:24:9`!(powerup_data_secondary[p].added_one_msg)); |
| 2640 | else |
| 2641 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXTcxx . . $ `Descent3/stringtable.h:24:9`!(powerup_data_secondary[p].full_msg)); |
| 2642 | } |
| 2643 | // Give the player the weapon if didn't already have it |
| 2644 | |
| 2645 | shipcxx . . $ ship# *ship = &Shipscxx . . $ Ships.[Playerscxx . . $ Players.[player->idcxx . . $ object#id.].ship_indexcxx . . $ player#ship_index.]; |
| 2646 | otype_wb_infocxx . . $ otype_wb_info# *wb = &ship->static_wbcxx . . $ ship#static_wb.[weapon_index]; |
| 2647 | |
| 2648 | if (!has_weapon || (player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num. && wb->ammo_usagecxx . . $ otype_wb_info#ammo_usage. > 1 && |
| 2649 | wb->ammo_usagecxx . . $ otype_wb_info#ammo_usage. == Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_ammocxx . . $ player#weapon_ammo.[weapon_index])) |
| 2650 | AddWeaponToPlayercxx . . $ AddWeaponToPlayer(2326284602b0bb2d).(player->idcxx . . $ object#id., weapon_index, 0); |
| 2651 | } |
| 2652 | } |
| 2653 | // Check the ammo powerups |
| 2654 | for (p = 0; p < NUM_POWERUP_TYPES_AMMOcxx . . $ `Descent3/multisafe.cpp:2544:9`!; p++) { |
| 2655 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(pname, powerup_data_ammo[p].name)) { |
| 2656 | handled = true; |
| 2657 | int weapon_index = powerup_data_ammocxx . . $ powerup_data_ammo.[p].weapon_indexcxx . . $ $anonymous_type_98fafd4806cc7515_2#weapon_index.; |
| 2658 | ASSERTcxx . . $ `misc/pserror.h:246:9`!(weapon_index < SECONDARY_INDEXcxx . . $ `Descent3/weapon.h:255:9`!); |
| 2659 | // Get the ammo from this weapon |
| 2660 | int old_ammo = Playerscxx . . $ Players.[player->idcxx . . $ object#id.].weapon_ammocxx . . $ player#weapon_ammo.[weapon_index]; |
| 2661 | int added = AddWeaponAmmocxx . . $ AddWeaponAmmo(2326284602b0bb2d).(player->idcxx . . $ object#id., weapon_index, powerup->ctypecxx . . $ object#ctype..powerup_infocxx . . $ object#$anonymous_type_9#powerup_info..countcxx . . $ powerup_info_s#count.); |
| 2662 | // Pickup powerup if multiplayer or if got any ammo from it |
| 2663 | *pickup = (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) || (added != 0); |
| 2664 | |
| 2665 | if (player->idcxx . . $ object#id. == Player_numcxx . . $ Player_num.) { |
| 2666 | if (added > 0) |
| 2667 | ShowAmmoAddedMessagecxx . . $ ShowAmmoAddedMessage(b1146eedae1e1d0b).(weapon_index, powerup_data_ammocxx . . $ powerup_data_ammo.[p].ammo_msgcxx . . $ $anonymous_type_98fafd4806cc7515_2#ammo_msg., added); |
| 2668 | else |
| 2669 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXTcxx . . $ `Descent3/stringtable.h:24:9`!(powerup_data_ammo[p].full_msg)); |
| 2670 | } |
| 2671 | // Check to select the weapon |
| 2672 | if (added && PlayerHasWeaponcxx . . $ PlayerHasWeapon(cf9ef193275fa6d8).(player->idcxx . . $ object#id., weapon_index) && (old_ammo == 0)) |
| 2673 | CheckForWeaponSelectcxx . . $ CheckForWeaponSelect(3e454b8ccf442868).(player->idcxx . . $ object#id., weapon_index); |
| 2674 | } |
| 2675 | } |
| 2676 | return handled; |
| 2677 | } |
| 2678 | // returns true if it was handled |
| 2679 | bool HandleCommonPowerupscxx . . $ HandleCommonPowerups(75a2683c3e634812).(char *pname, msafe_structcxx . . $ msafe_struct# *mstruct, uint8_tcxx . . $ uint8_t# *pickup) { |
| 2680 | int pnum = IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->idcxx . . $ object#id.; |
| 2681 | bool handled = false; |
| 2682 | // Shield bonus |
| 2683 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("Shield", pname)) { |
| 2684 | handled = true; |
| 2685 | // If this guy is already at max shields, then don't do anything |
| 2686 | if ((IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->shieldscxx . . $ object#shields.) >= MAX_SHIELDScxx . . $ `Descent3/player_external.h:72:9`!) { |
| 2687 | if (pnum == Player_numcxx . . $ Player_num.) |
| 2688 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_MAXSHIELDScxx . . $ `Descent3/stringtable.h:666:9`!); |
| 2689 | } else { |
| 2690 | // Pick it up |
| 2691 | *pickup = 1; |
| 2692 | float addval = SHIELD_BONUScxx . . $ `Descent3/multisafe.cpp:2416:9`! * Diff_shield_energy_scalarcxx . . $ Diff_shield_energy_scalar.[DIFF_LEVELcxx . . $ `Descent3/difficulty.h:29:9`!]; |
| 2693 | if (IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->shieldscxx . . $ object#shields. + addval > MAX_SHIELDScxx . . $ `Descent3/player_external.h:72:9`!) |
| 2694 | addval = MAX_SHIELDScxx . . $ `Descent3/player_external.h:72:9`! - IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->shieldscxx . . $ object#shields.; |
| 2695 | |
| 2696 | IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->shieldscxx . . $ object#shields. += addval; |
| 2697 | if (pnum == Player_numcxx . . $ Player_num.) |
| 2698 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_SHIELDBOOSTcxx . . $ `Descent3/stringtable.h:667:9`!, (int)IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->shieldscxx . . $ object#shields.); |
| 2699 | } |
| 2700 | } |
| 2701 | // ENERGY POWERUP |
| 2702 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("Energy", pname)) { |
| 2703 | handled = true; |
| 2704 | float addval = ENERGY_BONUScxx . . $ `Descent3/multisafe.cpp:2417:9`! * Diff_shield_energy_scalarcxx . . $ Diff_shield_energy_scalar.[DIFF_LEVELcxx . . $ `Descent3/difficulty.h:29:9`!]; |
| 2705 | addval = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(addval, MAX_ENERGYcxx . . $ `Descent3/player_external.h:71:9`! - Playerscxx . . $ Players.[pnum].energycxx . . $ player#energy.); |
| 2706 | Playerscxx . . $ Players.[pnum].energycxx . . $ player#energy. += addval; |
| 2707 | // Pick up if multiplayer or added |
| 2708 | if ((Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) || (addval > 0)) |
| 2709 | *pickup = 1; |
| 2710 | if (pnum == Player_numcxx . . $ Player_num.) |
| 2711 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).((addval > 0) ? TXT_MSG_ENERGYcxx . . $ `Descent3/stringtable.h:668:9`! : TXT_MAXENERGYcxx . . $ `Descent3/stringtable.h:74:9`!); |
| 2712 | } |
| 2713 | // Quad Laser |
| 2714 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("QuadLaser", pname)) { |
| 2715 | handled = true; |
| 2716 | objectcxx . . $ object# *pobj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.]; |
| 2717 | if (!(pobj->dynamic_wbcxx . . $ object#dynamic_wb.[LASER_INDEXcxx . . $ `Descent3/weapon_external.h:22:9`!].flagscxx . . $ dynamic_wb_info#flags. & DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!)) { |
| 2718 | // player doesn't have Quad Lasers |
| 2719 | |
| 2720 | if (pnum == Player_numcxx . . $ Player_num.) |
| 2721 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_QUADLASERcxx . . $ `Descent3/stringtable.h:669:9`!); |
| 2722 | *pickup = 1; |
| 2723 | pobj->dynamic_wbcxx . . $ object#dynamic_wb.[LASER_INDEXcxx . . $ `Descent3/weapon_external.h:22:9`!].flagscxx . . $ dynamic_wb_info#flags. |= DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!; |
| 2724 | pobj->dynamic_wbcxx . . $ object#dynamic_wb.[SUPER_LASER_INDEXcxx . . $ `Descent3/weapon_external.h:27:9`!].flagscxx . . $ dynamic_wb_info#flags. |= DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!; |
| 2725 | // add them to the inventory so we can spew it |
| 2726 | static int quad_id = -2; |
| 2727 | if (quad_id == -2) |
| 2728 | quad_id = FindObjectIDNamecxx . . $ FindObjectIDName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(pname)); |
| 2729 | if (quad_id > -1) { |
| 2730 | Playerscxx . . $ Players.[pnum].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, quad_id, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, -1, -1, INVAF_LEVELLASTcxx . . $ `scripts/osiris_common.h:767:9`! | INVAF_TIMEOUTONSPEWcxx . . $ `scripts/osiris_common.h:766:9`!); |
| 2731 | } |
| 2732 | } else if (pnum == Player_numcxx . . $ Player_num.) |
| 2733 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_MSG_QUADHAVEcxx . . $ `Descent3/stringtable.h:670:9`!); |
| 2734 | } |
| 2735 | // FullMap Powerup |
| 2736 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("FullMap", pname)) { |
| 2737 | handled = true; |
| 2738 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2739 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_FULLMAPcxx . . $ `Descent3/stringtable.h:692:9`!); |
| 2740 | |
| 2741 | for (int i = 0; i < MAX_ROOMScxx . . $ `Descent3/room.h:377:9`!; i++) { |
| 2742 | if (!(Roomscxx . . $ Rooms.[i].flagscxx . . $ room#flags. & RF_SECRETcxx . . $ `Descent3/room_external.h:201:9`!)) |
| 2743 | AutomapVisMapcxx . . $ AutomapVisMap.[i] = 1; |
| 2744 | } |
| 2745 | } |
| 2746 | |
| 2747 | *pickup = 1; |
| 2748 | } |
| 2749 | // Thief stolen automap |
| 2750 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("ThiefAutoMap", pname)) { |
| 2751 | handled = true; |
| 2752 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2753 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_RETURNEDAUTOMAPcxx . . $ `Descent3/stringtable.h:841:9`!); |
| 2754 | } |
| 2755 | ThiefReturnItemcxx . . $ ThiefReturnItem(3e454b8ccf442868).(IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->handlecxx . . $ object#handle., THIEFITEM_AUTOMAPcxx . . $ `scripts/osiris_common.h:772:9`!); |
| 2756 | *pickup = 1; |
| 2757 | } |
| 2758 | // Thief stolen headlight |
| 2759 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("HeadlightPowerup", pname)) { |
| 2760 | handled = true; |
| 2761 | if (!ThiefPlayerHasItemcxx . . $ ThiefPlayerHasItem(cf9ef193275fa6d8).(IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->handlecxx . . $ object#handle., THIEFITEM_HEADLIGHTcxx . . $ `scripts/osiris_common.h:773:9`!)) { |
| 2762 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2763 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_RETURNEDHEADLIGHTcxx . . $ `Descent3/stringtable.h:842:9`!); |
| 2764 | } |
| 2765 | ThiefReturnItemcxx . . $ ThiefReturnItem(3e454b8ccf442868).(IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->handlecxx . . $ object#handle., THIEFITEM_HEADLIGHTcxx . . $ `scripts/osiris_common.h:773:9`!); |
| 2766 | *pickup = 1; |
| 2767 | } else { |
| 2768 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2769 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_HAVEHEADLIGHTcxx . . $ `Descent3/stringtable.h:843:9`!); |
| 2770 | } |
| 2771 | } |
| 2772 | } |
| 2773 | // Invulnerability |
| 2774 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(pname, "Invulnerability")) { |
| 2775 | handled = true; |
| 2776 | if (!(Playerscxx . . $ Players.[pnum].flagscxx . . $ player#flags. & PLAYER_FLAGS_INVULNERABLEcxx . . $ `Descent3/player_external.h:79:9`!)) { |
| 2777 | float time_period = 30.0f; // 30 seconds |
| 2778 | MakePlayerInvulnerablecxx . . $ MakePlayerInvulnerable(a421cb528a2d8d2f).(pnum, time_period, true); |
| 2779 | *pickup = 1; |
| 2780 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 2781 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_INVULNALREADYcxx . . $ `Descent3/stringtable.h:672:9`!); |
| 2782 | } |
| 2783 | } |
| 2784 | // Cloak |
| 2785 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(pname, "Cloak")) { |
| 2786 | handled = true; |
| 2787 | if (IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->effect_infocxx . . $ object#effect_info.) { |
| 2788 | if (!((IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. & EF_FADING_OUTcxx . . $ `Descent3/object_external.h:207:9`!) || (IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->effect_infocxx . . $ object#effect_info.->type_flagscxx . . $ effect_info_s#type_flags. & EF_CLOAKEDcxx . . $ `Descent3/object_external.h:197:9`!))) { |
| 2789 | float time_period = 30.0f; // 30 seconds |
| 2790 | MakeObjectInvisiblecxx . . $ MakeObjectInvisible(3cdd7424a643b971).(IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!, time_period); |
| 2791 | *pickup = 1; |
| 2792 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 2793 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_CLOAKALREADYcxx . . $ `Descent3/stringtable.h:674:9`!); |
| 2794 | } |
| 2795 | } |
| 2796 | } |
| 2797 | return handled; |
| 2798 | } |
| 2799 | bool HandleCounterMeasurePowerupscxx . . $ HandleCounterMeasurePowerups(75a2683c3e634812).(char *pname, msafe_structcxx . . $ msafe_struct# *mstruct, uint8_tcxx . . $ uint8_t# *pickup) { |
| 2800 | bool handled = false; |
| 2801 | // Chaff |
| 2802 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("Chaff", pname)) { |
| 2803 | handled = true; |
| 2804 | int pnum = IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->idcxx . . $ object#id.; |
| 2805 | int added_count = 0; |
| 2806 | int weapon_id = FindWeaponNamecxx . . $ FindWeaponName(5c4306d8553b3696).("Chaff"); |
| 2807 | |
| 2808 | if (weapon_id != -1) { |
| 2809 | int amount = 12 - Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id); |
| 2810 | if (amount > 4) |
| 2811 | amount = 4; |
| 2812 | if (amount > 0) { |
| 2813 | for (int c = 0; c < amount; c++) { |
| 2814 | if (Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..AddCounterMeasurecxx . . $ Inventory#AddCounterMeasure(1165f2dcd82ced24).(weapon_id, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type., MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.)) { |
| 2815 | added_count++; |
| 2816 | } else |
| 2817 | break; |
| 2818 | } |
| 2819 | if (added_count) { |
| 2820 | // Pick it up |
| 2821 | *pickup = 1; |
| 2822 | } |
| 2823 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2824 | if (added_count == 1) { |
| 2825 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_CHAFFcxx . . $ `Descent3/stringtable.h:675:9`!); |
| 2826 | } else if (added_count > 1) { |
| 2827 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_MSG_MULTI_CHAFFScxx . . $ `Descent3/stringtable.h:676:9`!, added_count); |
| 2828 | } else { |
| 2829 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_COUNTERMEASUREFULLcxx . . $ `Descent3/stringtable.h:677:9`!); |
| 2830 | } |
| 2831 | } |
| 2832 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 2833 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_CHAFFSFULLcxx . . $ `Descent3/stringtable.h:678:9`!); |
| 2834 | } |
| 2835 | } |
| 2836 | } |
| 2837 | // Betty4pack |
| 2838 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("Betty4Pack", pname)) { |
| 2839 | handled = true; |
| 2840 | int pnum = IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->idcxx . . $ object#id.; |
| 2841 | int added_count = 0; |
| 2842 | int weapon_id = FindWeaponNamecxx . . $ FindWeaponName(5c4306d8553b3696).("Betty"); |
| 2843 | |
| 2844 | if (weapon_id != -1) { |
| 2845 | int amount = 12 - Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id); |
| 2846 | if (amount > 4) |
| 2847 | amount = 4; |
| 2848 | if (amount > 0) { |
| 2849 | for (int c = 0; c < amount; c++) { |
| 2850 | if (Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..AddCounterMeasurecxx . . $ Inventory#AddCounterMeasure(1165f2dcd82ced24).(weapon_id, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type., MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.)) { |
| 2851 | added_count++; |
| 2852 | } else |
| 2853 | break; |
| 2854 | } |
| 2855 | if (added_count) { |
| 2856 | // Pick it up |
| 2857 | *pickup = 1; |
| 2858 | } |
| 2859 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2860 | if (added_count == 1) { |
| 2861 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_BETTYcxx . . $ `Descent3/stringtable.h:679:9`!); |
| 2862 | } else if (added_count > 1) { |
| 2863 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_MSG_MULTI_BETTYcxx . . $ `Descent3/stringtable.h:680:9`!, added_count); |
| 2864 | } else { |
| 2865 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_COUNTERMEASUREFULLcxx . . $ `Descent3/stringtable.h:677:9`!); |
| 2866 | } |
| 2867 | } |
| 2868 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 2869 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_BETTYFULLcxx . . $ `Descent3/stringtable.h:681:9`!); |
| 2870 | } |
| 2871 | } |
| 2872 | } |
| 2873 | // Seeker3pack |
| 2874 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("Seeker3Pack", pname)) { |
| 2875 | handled = true; |
| 2876 | int pnum = IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->idcxx . . $ object#id.; |
| 2877 | int added_count = 0; |
| 2878 | int weapon_id = FindWeaponNamecxx . . $ FindWeaponName(5c4306d8553b3696).("SeekerMine"); |
| 2879 | |
| 2880 | if (weapon_id != -1) { |
| 2881 | int amount = 12 - Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id); |
| 2882 | if (amount > 3) |
| 2883 | amount = 3; |
| 2884 | if (amount > 0) { |
| 2885 | for (int c = 0; c < amount; c++) { |
| 2886 | if (Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..AddCounterMeasurecxx . . $ Inventory#AddCounterMeasure(1165f2dcd82ced24).(weapon_id, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type., MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.)) { |
| 2887 | added_count++; |
| 2888 | } else |
| 2889 | break; |
| 2890 | } |
| 2891 | if (added_count) { |
| 2892 | // Pick it up |
| 2893 | *pickup = 1; |
| 2894 | } |
| 2895 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2896 | if (added_count == 1) { |
| 2897 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_SEEKERMINEcxx . . $ `Descent3/stringtable.h:682:9`!); |
| 2898 | } else if (added_count > 1) { |
| 2899 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_MSG_MULTI_SEEKERScxx . . $ `Descent3/stringtable.h:683:9`!, added_count); |
| 2900 | } else { |
| 2901 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_COUNTERMEASUREFULLcxx . . $ `Descent3/stringtable.h:677:9`!); |
| 2902 | } |
| 2903 | } |
| 2904 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 2905 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_SEEKERFULLcxx . . $ `Descent3/stringtable.h:684:9`!); |
| 2906 | } |
| 2907 | } |
| 2908 | } |
| 2909 | // Gunboy |
| 2910 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("GunboyPowerup", pname)) { |
| 2911 | handled = true; |
| 2912 | int pnum = IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->idcxx . . $ object#id.; |
| 2913 | int added_count = 0; |
| 2914 | int weapon_id = FindWeaponNamecxx . . $ FindWeaponName(5c4306d8553b3696).("GunBoy"); |
| 2915 | |
| 2916 | if (weapon_id != -1) { |
| 2917 | int amount = 4 - Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id); |
| 2918 | if (amount > 1) |
| 2919 | amount = 1; |
| 2920 | if (amount > 0) { |
| 2921 | for (int c = 0; c < amount; c++) { |
| 2922 | if (Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..AddCounterMeasurecxx . . $ Inventory#AddCounterMeasure(1165f2dcd82ced24).(weapon_id, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type., MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.)) { |
| 2923 | added_count++; |
| 2924 | } else |
| 2925 | break; |
| 2926 | } |
| 2927 | if (added_count) { |
| 2928 | // Pick it up |
| 2929 | *pickup = 1; |
| 2930 | } |
| 2931 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2932 | if (added_count == 1) { |
| 2933 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_GUNBOYcxx . . $ `Descent3/stringtable.h:685:9`!); |
| 2934 | } else if (added_count > 1) { |
| 2935 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_MSG_MULTI_GUNBOYcxx . . $ `Descent3/stringtable.h:686:9`!, added_count); |
| 2936 | } else { |
| 2937 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_COUNTERMEASUREFULLcxx . . $ `Descent3/stringtable.h:677:9`!); |
| 2938 | } |
| 2939 | } |
| 2940 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 2941 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_GUNBOYFULLcxx . . $ `Descent3/stringtable.h:687:9`!); |
| 2942 | } |
| 2943 | } |
| 2944 | } |
| 2945 | // ProxMine |
| 2946 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("ProxMinePowerup", pname)) { |
| 2947 | handled = true; |
| 2948 | int pnum = IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->idcxx . . $ object#id.; |
| 2949 | int added_count = 0; |
| 2950 | int weapon_id = FindWeaponNamecxx . . $ FindWeaponName(5c4306d8553b3696).("ProxMine"); |
| 2951 | |
| 2952 | if (weapon_id != -1) { |
| 2953 | int amount = 12 - Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id); |
| 2954 | if (amount > 4) |
| 2955 | amount = 4; |
| 2956 | if (amount > 0) { |
| 2957 | for (int c = 0; c < amount; c++) { |
| 2958 | if (Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..AddCounterMeasurecxx . . $ Inventory#AddCounterMeasure(1165f2dcd82ced24).(weapon_id, MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->typecxx . . $ object#type., MOBJcxx . . $ `Descent3/multisafe.cpp:685:9`!->idcxx . . $ object#id.)) { |
| 2959 | added_count++; |
| 2960 | } else |
| 2961 | break; |
| 2962 | } |
| 2963 | if (added_count) { |
| 2964 | // Pick it up |
| 2965 | *pickup = 1; |
| 2966 | } |
| 2967 | if (pnum == Player_numcxx . . $ Player_num.) { |
| 2968 | if (added_count == 1) { |
| 2969 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_PROXMINEcxx . . $ `Descent3/stringtable.h:744:9`!); |
| 2970 | } else if (added_count > 1) { |
| 2971 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_PROXMINECOUNTcxx . . $ `Descent3/stringtable.h:745:9`!, added_count); |
| 2972 | } else { |
| 2973 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_COUNTERMEASUREFULLcxx . . $ `Descent3/stringtable.h:677:9`!); |
| 2974 | } |
| 2975 | } |
| 2976 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 2977 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_PROXMINEFULLcxx . . $ `Descent3/stringtable.h:746:9`!); |
| 2978 | } |
| 2979 | } |
| 2980 | } |
| 2981 | return handled; |
| 2982 | } |
| 2983 | bool HandleInventoryPowerupscxx . . $ HandleInventoryPowerups(75a2683c3e634812).(char *pname, msafe_structcxx . . $ msafe_struct# *mstruct, uint8_tcxx . . $ uint8_t# *pickup) { |
| 2984 | bool handled = false; |
| 2985 | int pnum = IOBJcxx . . $ `Descent3/multisafe.cpp:687:9`!->idcxx . . $ object#id.; |
| 2986 | // Afterburner cooler |
| 2987 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("Afterburner", pname)) { |
| 2988 | handled = true; |
| 2989 | int ab_id = FindObjectIDNamecxx . . $ FindObjectIDName(5c4306d8553b3696).("Afterburner"); |
| 2990 | if (ab_id != -1) { |
| 2991 | |
| 2992 | int inv_count = Playerscxx . . $ Players.[pnum].inventorycxx . . $ player#inventory..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, ab_id); |
| 2993 | if (inv_count == 0) { |
| 2994 | // pickit up |
| 2995 | *pickup = 1; |
| 2996 | Playerscxx . . $ Players.[pnum].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, ab_id, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, -1, -1, INVAF_TIMEOUTONSPEWcxx . . $ `scripts/osiris_common.h:766:9`!, TXT_ABCOOLERcxx . . $ `Descent3/stringtable.h:840:9`!); |
| 2997 | if (pnum == Player_numcxx . . $ Player_num.) |
| 2998 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_AFTERBURNERCOOLERcxx . . $ `Descent3/stringtable.h:688:9`!); |
| 2999 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 3000 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_ABCOOLERHAVEcxx . . $ `Descent3/stringtable.h:689:9`!); |
| 3001 | } |
| 3002 | } |
| 3003 | } |
| 3004 | // Energy->Shield Converter |
| 3005 | else if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!("Converter", pname)) { |
| 3006 | handled = true; |
| 3007 | int es_id = FindObjectIDNamecxx . . $ FindObjectIDName(5c4306d8553b3696).("Converter"); |
| 3008 | if (es_id != -1) { |
| 3009 | int inv_count = Playerscxx . . $ Players.[pnum].inventorycxx . . $ player#inventory..GetTypeIDCountcxx . . $ Inventory#GetTypeIDCount(9b79fb6aee4c0440).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, es_id); |
| 3010 | if (inv_count == 0) { |
| 3011 | // pick it up |
| 3012 | *pickup = 1; |
| 3013 | Playerscxx . . $ Players.[pnum].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, es_id, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, -1, -1, INVAF_TIMEOUTONSPEWcxx . . $ `scripts/osiris_common.h:766:9`!); |
| 3014 | if (pnum == Player_numcxx . . $ Player_num.) |
| 3015 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_ETOSCONVERTERcxx . . $ `Descent3/stringtable.h:690:9`!); |
| 3016 | } else if (pnum == Player_numcxx . . $ Player_num.) { |
| 3017 | AddFilteredHUDMessagecxx . . $ AddFilteredHUDMessage(f90d95ab21fd6d97).(TXT_ETOSCONVHAVEcxx . . $ `Descent3/stringtable.h:691:9`!); |
| 3018 | } |
| 3019 | } |
| 3020 | } |
| 3021 | return handled; |
| 3022 | } |