| 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/multi.cpp $ |
| 21 |
* $Revision: 530 $ |
| 22 |
* $Date: 10/22/01 12:42p $ |
| 23 |
* $Author: Matt $ |
| 24 |
* |
| 25 |
* Multiplayer code |
| 26 |
* |
| 27 |
* $Log: /DescentIII/Main/multi.cpp $ |
| 28 |
* |
| 29 |
* 530 10/22/01 12:42p Matt |
| 30 |
* Changed previous fix to use spiffy new function to test for Mercenary |
| 31 |
* installed. |
| 32 |
* |
| 33 |
* 529 10/22/01 11:12a Matt |
| 34 |
* Put up HUD message when server tells us to switch ships. |
| 35 |
* If told to switch to Black Pyro but don't have Merc, bail. |
| 36 |
* |
| 37 |
* 528 9/29/01 5:34p Kevin |
| 38 |
* hack to prevent the observermode powerup stealing cheat/bug |
| 39 |
* |
| 40 |
* 527 9/13/01 2:32p Matt |
| 41 |
* When recording a demo, save the new player position when a player |
| 42 |
* respawns. |
| 43 |
* |
| 44 |
* 526 7/09/01 4:21p Matt |
| 45 |
* Fixed code that used AllowedShips[] instead of Ships[] to find a valid |
| 46 |
* ship. |
| 47 |
* |
| 48 |
* 525 4/20/00 6:23p Matt |
| 49 |
* Fixed a bug that caused the difficulty for games in the games list to |
| 50 |
* be always set to zero or one. |
| 51 |
* |
| 52 |
* 524 4/19/00 5:07p Matt |
| 53 |
* From Duane for 1.4 |
| 54 |
* Added checks, asserts, and fixes for bad return values |
| 55 |
* |
| 56 |
* 523 3/20/00 12:17p Matt |
| 57 |
* Merge of Duane's post-1.3 changes. |
| 58 |
* Check for callsign too long. |
| 59 |
* Byteswap fix. |
| 60 |
* |
| 61 |
* 522 2/01/00 3:47a Jason |
| 62 |
* made usesmoothing be a client side option only |
| 63 |
* |
| 64 |
* 521 1/30/00 2:11p Jason |
| 65 |
* Added -usesmoothing option back in |
| 66 |
* |
| 67 |
* 520 1/22/00 10:43p Jason |
| 68 |
* Fixed phantom napalm and vauss bugs |
| 69 |
* |
| 70 |
* 519 1/22/00 5:36p Jason |
| 71 |
* Took out reliable secondaries. Define RELIABLE_SECONDARIES to reenable |
| 72 |
* this behavior (not recommended) |
| 73 |
* |
| 74 |
* 518 10/20/99 5:40p Chris |
| 75 |
* Added the Red Guidebot |
| 76 |
* |
| 77 |
* 517 10/16/99 9:56p Jeff |
| 78 |
* added a way to strip all players of all weapons and energy |
| 79 |
* |
| 80 |
* 516 10/16/99 8:45p Jeff |
| 81 |
* created multi functions to strip a player of his weapons and energy |
| 82 |
* |
| 83 |
* 515 9/17/99 2:43p Kevin |
| 84 |
* fixed bug where pxo stats weren't written if the game quit |
| 85 |
* |
| 86 |
* 514 9/09/99 12:24p Kevin |
| 87 |
* Fixed a bug that was causing problems in the Mac version |
| 88 |
* (Game_is_master_tracker_game was defined as a uint8_t in the game, but an |
| 89 |
* int in the dll) |
| 90 |
* |
| 91 |
* 513 9/02/99 3:34p Jason |
| 92 |
* send secondary fire reliable in a C/S game |
| 93 |
* |
| 94 |
* 512 9/01/99 6:56p Jason |
| 95 |
* fixed guided missiles and timeout missiles so they work in multiplayer |
| 96 |
* |
| 97 |
* 511 9/01/99 4:12p Kevin |
| 98 |
* Byte ordering fixes for the macintosh |
| 99 |
* |
| 100 |
* 510 8/23/99 5:14p Kevin |
| 101 |
* Macintosh fixes |
| 102 |
* |
| 103 |
* 509 7/28/99 4:05p Kevin |
| 104 |
* Mac |
| 105 |
* |
| 106 |
* 508 7/28/99 3:58p Kevin |
| 107 |
* mac |
| 108 |
* |
| 109 |
* 507 7/20/99 12:57p Jason |
| 110 |
* added MOTD to server |
| 111 |
* |
| 112 |
* 506 7/12/99 4:15p Kevin |
| 113 |
* Changed the way we determine if we should report stats or not in PXO |
| 114 |
* |
| 115 |
* 505 7/12/99 1:56p Jason |
| 116 |
* fixed dumb ammo bug |
| 117 |
* |
| 118 |
* 504 7/08/99 5:44p Jason |
| 119 |
* Fixed some cheating holes for the patch |
| 120 |
* |
| 121 |
* 503 7/06/99 5:52p Kevin |
| 122 |
* PXO & multiplayer fixes for the patch |
| 123 |
* |
| 124 |
* 502 5/24/99 5:42p Jason |
| 125 |
* Fixed off by one observer crash |
| 126 |
* |
| 127 |
* 501 5/23/99 3:04a Jason |
| 128 |
* fixed bug with player rankings not being updated correctly |
| 129 |
* |
| 130 |
* 500 5/22/99 10:27p Jason |
| 131 |
* changes for multiplayer and buildings, ai |
| 132 |
* |
| 133 |
* 499 5/22/99 12:33a Jason |
| 134 |
* added sending of physics flags upon joining |
| 135 |
* |
| 136 |
* 498 5/21/99 7:07p Jason |
| 137 |
* fixed some weird multiplayer rejoin anomalies |
| 138 |
* |
| 139 |
* 497 5/20/99 4:55p Jason |
| 140 |
* added heartbeats to server |
| 141 |
* |
| 142 |
* 496 5/20/99 4:10p Jason |
| 143 |
* added heartbeat to multiplayer so clients wouldn't time out, also |
| 144 |
* various multiplayer fixes |
| 145 |
* |
| 146 |
* 495 5/20/99 2:52p Jason |
| 147 |
* made autowaypoints work in coop |
| 148 |
* |
| 149 |
* 494 5/20/99 11:57a Jason |
| 150 |
* took out bogus int3 |
| 151 |
* |
| 152 |
* 493 5/20/99 2:48a Matt |
| 153 |
* Auto-waypoints now stored & used per player. Manual waypoints will all |
| 154 |
* players, once Jason makes it work. |
| 155 |
* |
| 156 |
* 492 5/19/99 9:58p Jason |
| 157 |
* no collide with ghosted ships |
| 158 |
* |
| 159 |
* 491 5/19/99 5:39p Jason |
| 160 |
* made level failing work in coop |
| 161 |
* |
| 162 |
* 490 5/19/99 4:58p Jason |
| 163 |
* changes for ranking system |
| 164 |
* |
| 165 |
* 489 5/19/99 4:10p Jason |
| 166 |
* fixed wacky killer problem |
| 167 |
* |
| 168 |
* 488 5/19/99 3:24p Jason |
| 169 |
* fixed wrong ordering of InitObjectScripts and MultiSendObject |
| 170 |
* |
| 171 |
* 487 5/19/99 12:11p Jason |
| 172 |
* fixed some issues with multiplayer |
| 173 |
* |
| 174 |
* 486 5/19/99 12:03p Kevin |
| 175 |
* added mprintf |
| 176 |
* |
| 177 |
* 485 5/18/99 10:15p Kevin |
| 178 |
* made it so a client who is disconnected but the server still hasn't |
| 179 |
* timed him out will not see the game until the server times him out, and |
| 180 |
* he won't stay connected while in the join games screen |
| 181 |
* |
| 182 |
* 484 5/13/99 7:19p Jason |
| 183 |
* made dying objects be able to be updated |
| 184 |
* |
| 185 |
* 483 5/13/99 7:18p Jeff |
| 186 |
* safety check in MultiDoUnattach |
| 187 |
* |
| 188 |
* 482 5/13/99 1:07p Jason |
| 189 |
* added ASSERT for Jeff |
| 190 |
* |
| 191 |
* 481 5/12/99 1:57p Jason |
| 192 |
* fixed yet more buggy/ugly code |
| 193 |
* |
| 194 |
* 480 5/11/99 9:42p Jeff |
| 195 |
* send tracker id of players to other players |
| 196 |
* |
| 197 |
* 479 5/11/99 10:59a Kevin |
| 198 |
* Ship allow/dissalow works now! |
| 199 |
* |
| 200 |
* 478 5/10/99 10:22p Ardussi |
| 201 |
* changes to compile on Mac |
| 202 |
* |
| 203 |
* 477 5/10/99 5:35p Kevin |
| 204 |
* New command line options for heat and scoring API enhancements |
| 205 |
* |
| 206 |
* 476 5/10/99 1:45a Jason |
| 207 |
* took out turret and robot position counters |
| 208 |
* |
| 209 |
* 475 5/10/99 1:22a Jason |
| 210 |
* took out object error call |
| 211 |
* |
| 212 |
* 474 5/09/99 1:34p Kevin |
| 213 |
* Added diffuculty level system to multiplayer |
| 214 |
* |
| 215 |
* 473 5/08/99 5:22p Jason |
| 216 |
* fix audio taunt crash in single player |
| 217 |
* |
| 218 |
* 472 5/08/99 4:31a Jeff |
| 219 |
* fixed sequencing bug where clients never got a level end event for the |
| 220 |
* multiplayer games |
| 221 |
* |
| 222 |
* 471 5/07/99 3:16p Jason |
| 223 |
* fixed some more multiplayer issues |
| 224 |
* |
| 225 |
* 470 5/07/99 2:50p Jason |
| 226 |
* fixed a bunch of endlevel multiplayer issues |
| 227 |
* |
| 228 |
* 469 5/06/99 1:04a Kevin |
| 229 |
* scoring API stuff |
| 230 |
* |
| 231 |
* 468 5/05/99 5:41p Jason |
| 232 |
* fixed various multiplayer issues, including sequencing bugs and cheat |
| 233 |
* prevention |
| 234 |
* |
| 235 |
* 467 5/05/99 12:23p Jason |
| 236 |
* fixed some problems with ending levels |
| 237 |
* |
| 238 |
* 466 5/05/99 10:27a Kevin |
| 239 |
* fixed some more player count bugs. |
| 240 |
* |
| 241 |
* 465 5/05/99 10:00a Kevin |
| 242 |
* fixed dedicated server 'current number of players' count |
| 243 |
* |
| 244 |
* 464 5/03/99 2:35p Jason |
| 245 |
* change for multiplayer games |
| 246 |
* |
| 247 |
* 463 5/03/99 1:17p Jason |
| 248 |
* hack for disappearing powerup bug |
| 249 |
* |
| 250 |
* 462 5/03/99 8:38a Jeff |
| 251 |
* handle world states for room's with goal/special flag change |
| 252 |
* |
| 253 |
* 461 5/02/99 5:09a Jeff |
| 254 |
* send levelgoal state to joining clients |
| 255 |
* |
| 256 |
* 460 4/30/99 7:49p Jason |
| 257 |
* setups urgent/non urgent reliable stuff better |
| 258 |
* |
| 259 |
* 459 4/30/99 5:43p Jason |
| 260 |
* took out some errors |
| 261 |
* |
| 262 |
* 458 4/30/99 5:15p Kevin |
| 263 |
* possibly fixed bug related to dedicated server player count |
| 264 |
* |
| 265 |
* 457 4/30/99 1:10p Jason |
| 266 |
* fixed sounds being sent reliably by the server |
| 267 |
* |
| 268 |
* 456 4/30/99 12:58p Jeff |
| 269 |
* fixed inventory removed bug in multiplayer |
| 270 |
* |
| 271 |
* 455 4/30/99 12:01a Jason |
| 272 |
* added ability to set the next level in a multiplayer game |
| 273 |
* |
| 274 |
* 454 4/29/99 11:02p Jeff |
| 275 |
* added the ability for the server to set audio taunt delay time via |
| 276 |
* command line option and/or dedicated server console |
| 277 |
* |
| 278 |
* 453 4/29/99 4:59p Jason |
| 279 |
* fixed bug with world states and refueling centers |
| 280 |
* |
| 281 |
* 452 4/29/99 3:07p Jason |
| 282 |
* added more cheat protection |
| 283 |
* |
| 284 |
* 451 4/29/99 2:09a Jason |
| 285 |
* added more safechecking for powerup bug tracking |
| 286 |
* |
| 287 |
* 450 4/29/99 2:00a Chris |
| 288 |
* Added the portal blockage support |
| 289 |
* |
| 290 |
* 449 4/28/99 9:16p Jeff |
| 291 |
* fixed inventory use bug...was using Server_object_list instead of |
| 292 |
* Local_object_list |
| 293 |
* |
| 294 |
* 448 4/28/99 7:37p Jason |
| 295 |
* fixed killer objnum bug |
| 296 |
* |
| 297 |
* 447 4/28/99 5:13p Jeff |
| 298 |
* fixed(?) clients using inventory items in coop |
| 299 |
* |
| 300 |
* 446 4/28/99 3:33a Jeff |
| 301 |
* removed useless IGC variable reset (wasn't needed, although previously |
| 302 |
* thought it was needed) |
| 303 |
* |
| 304 |
* 445 4/28/99 2:28a Jeff |
| 305 |
* finished (hopefully) making guidebot multiplayer friendly |
| 306 |
* |
| 307 |
* 444 4/27/99 8:32p Jason |
| 308 |
* fixed cinematic bug |
| 309 |
* |
| 310 |
* 443 4/27/99 3:46p Jeff |
| 311 |
* increased audio taunt delay to 5 seconds |
| 312 |
* |
| 313 |
* 442 4/27/99 4:42a Jeff |
| 314 |
* pass guidebot name on MyInfo |
| 315 |
* |
| 316 |
* 441 4/26/99 11:48p Jason |
| 317 |
* removed mprintfs |
| 318 |
* |
| 319 |
* 440 4/26/99 10:14p Kevin |
| 320 |
* Stop playing the napalm sound when a player dies in multi |
| 321 |
* |
| 322 |
* 439 4/26/99 7:08p Jason |
| 323 |
* fixed doorway join bug |
| 324 |
* |
| 325 |
* 438 4/26/99 11:59a Jeff |
| 326 |
* removed stupid test code that wasn't tested and broke everything |
| 327 |
* |
| 328 |
* 437 4/25/99 10:19p Matt |
| 329 |
* Fixed multiplayer and demo problems will killing an object from script, |
| 330 |
* and cleaned up the death code a bit in the process. |
| 331 |
* |
| 332 |
* 436 4/25/99 5:20p Jason |
| 333 |
* fixed some more coop bugs |
| 334 |
* |
| 335 |
* 435 4/25/99 5:02p Kevin |
| 336 |
* Bunches of multiplayer UI improvements |
| 337 |
* |
| 338 |
* 434 4/25/99 12:19p Kevin |
| 339 |
* fixed max players for dedicated server |
| 340 |
* |
| 341 |
* 433 4/25/99 8:57a Kevin |
| 342 |
* fixes for server info dialog |
| 343 |
* |
| 344 |
* 432 4/24/99 11:58p Kevin |
| 345 |
* Game info list (hit I in the pxo game list) |
| 346 |
* |
| 347 |
* 431 4/24/99 6:44p Jeff |
| 348 |
* added functions for theif so he can steal things other than weapons |
| 349 |
* |
| 350 |
* 430 4/22/99 8:29p Kevin |
| 351 |
* made psrand.h come after stdlib.h |
| 352 |
* |
| 353 |
* 429 4/22/99 5:46p Jason |
| 354 |
* made weapons work in multiplayer |
| 355 |
* |
| 356 |
* 428 4/22/99 3:24p Jason |
| 357 |
* fixed some multisafe problems |
| 358 |
* |
| 359 |
* 427 4/21/99 12:05p Jason |
| 360 |
* fixed sound priority bug |
| 361 |
* |
| 362 |
* 426 4/21/99 11:42a Kevin |
| 363 |
* fixed compiler warning |
| 364 |
* |
| 365 |
* 425 4/21/99 11:05a Kevin |
| 366 |
* new ps_rand and ps_srand to replace rand & srand |
| 367 |
* |
| 368 |
* 424 4/19/99 3:46a Jeff |
| 369 |
* fixed min/max problem |
| 370 |
* |
| 371 |
* 423 4/17/99 4:33p Jason |
| 372 |
* changes for robot/turret tracking |
| 373 |
* |
| 374 |
* 422 4/16/99 11:23p Jeff |
| 375 |
* added some includes to make linux happy |
| 376 |
* |
| 377 |
* 421 4/16/99 11:54a Matt |
| 378 |
* Took out include of directplay.h, which wasn't needed. |
| 379 |
* |
| 380 |
* 420 4/16/99 11:21a Kevin |
| 381 |
* Added netgame flags to game info packet |
| 382 |
* |
| 383 |
* 419 4/15/99 2:39p Kevin |
| 384 |
* Increased the amount of time the dedicated server will wait before |
| 385 |
* going on to the next level (to make sure the reliable code has time to |
| 386 |
* catch up on missed packets) |
| 387 |
* |
| 388 |
* 418 4/15/99 1:40a Jeff |
| 389 |
* changes for linux compile |
| 390 |
* |
| 391 |
* 417 4/14/99 2:51a Jeff |
| 392 |
* fixed some case mismatched #includes |
| 393 |
* |
| 394 |
* 416 4/11/99 1:57p Kevin |
| 395 |
* Made some static memory usage reductions |
| 396 |
* |
| 397 |
* 415 4/08/99 3:13p Matt |
| 398 |
* Finished cleaning up level sequencing code. Got rid of all the "level |
| 399 |
* minus one" stuff. |
| 400 |
* |
| 401 |
* 414 4/07/99 12:30p Matt |
| 402 |
* Added code for failed missions. |
| 403 |
* |
| 404 |
* 413 4/06/99 6:24p Jason |
| 405 |
* various fixes for multiplayer |
| 406 |
* |
| 407 |
* 412 4/05/99 10:54a Matt |
| 408 |
* Added auto-waypoint system |
| 409 |
* |
| 410 |
* 411 4/04/99 8:15p Jeff |
| 411 |
* added debug graph stuff |
| 412 |
* |
| 413 |
* 410 4/02/99 6:30p Jason |
| 414 |
* fixed multiplayer powerup/player start bugs |
| 415 |
* |
| 416 |
* 409 4/01/99 5:48p Kevin |
| 417 |
* Put in code to make it easy to add the guidebot to multiplayer (coop) |
| 418 |
* games |
| 419 |
* |
| 420 |
* 408 3/30/99 5:36p Matt |
| 421 |
* Fixed compile warnings |
| 422 |
* |
| 423 |
* 407 3/29/99 7:31p Jason |
| 424 |
* added better handling of non vis generic objects |
| 425 |
* |
| 426 |
* 406 3/27/99 2:19p Jason |
| 427 |
* transmit rankings when a player joins |
| 428 |
* |
| 429 |
* 405 3/25/99 1:41p Jason |
| 430 |
* took out debug mprintfs |
| 431 |
* |
| 432 |
* 404 3/25/99 1:41p Jeff |
| 433 |
* I'm a moron...forgot to send over player logo stuff on client join... |
| 434 |
* |
| 435 |
* 403 3/25/99 11:18a Jason |
| 436 |
* fixed fog state bug |
| 437 |
* |
| 438 |
* 402 3/22/99 6:21p Jeff |
| 439 |
* added 2 more audio taunts. a mulitplayer event when someone plays an |
| 440 |
* audio taunt. option to disable audio taunts. |
| 441 |
* |
| 442 |
* 401 3/17/99 4:08p Kevin |
| 443 |
* Changed the way games appear and timeout in the game list. |
| 444 |
* |
| 445 |
* 400 3/15/99 3:24p Kevin |
| 446 |
* Fixed some ingame file xfer stuff |
| 447 |
* |
| 448 |
* 399 3/12/99 7:49p Jeff |
| 449 |
* save player type changes and objects set to use life left |
| 450 |
* |
| 451 |
* 398 3/11/99 9:10p Jeff |
| 452 |
* fixed remaining known bugs in demo system (DemoWriteObjCreate being |
| 453 |
* called twice and </<= problems with |
| 454 |
* Highest_room_index/Highest_object_index). |
| 455 |
* |
| 456 |
* 397 3/11/99 6:30p Jeff |
| 457 |
* numerous fixes to demo system in multiplayer games (when |
| 458 |
* recording/playback a demo in a multiplayer game) |
| 459 |
* |
| 460 |
* 396 3/10/99 2:25p Kevin |
| 461 |
* Save/Load and Demo file fixes |
| 462 |
* |
| 463 |
* 395 3/09/99 6:13p Jason |
| 464 |
* fixed observer mode changing bug |
| 465 |
* |
| 466 |
* 394 3/08/99 4:00p Kevin |
| 467 |
* Better handling of level-level transitions on the server |
| 468 |
* |
| 469 |
* 393 3/05/99 1:24p Kevin |
| 470 |
* Fixed Stupid Direct serial bug where it would try to join the game |
| 471 |
* again and crash |
| 472 |
* |
| 473 |
* 392 3/04/99 8:50p Samir |
| 474 |
* AddColoredHUDMessage is formatted, so when mulitplayer messages went |
| 475 |
* out, they would take the % signs and screw up the string. Now it |
| 476 |
* doesn't. |
| 477 |
* |
| 478 |
* 391 3/04/99 3:46p Jason |
| 479 |
* fixed some multisafe stuff |
| 480 |
* |
| 481 |
* 390 3/04/99 3:30p Kevin |
| 482 |
* Fixed bug with not downloading files |
| 483 |
* |
| 484 |
* 389 3/02/99 5:50p Kevin |
| 485 |
* Ouch. Duplicate structures existed and were conflicting. |
| 486 |
* |
| 487 |
* 388 3/01/99 3:15p Jason |
| 488 |
* stop velocity when repositioning powerups |
| 489 |
* |
| 490 |
* 387 2/25/99 8:54p Jeff |
| 491 |
* Inventory supports level change persistant items. Inventory supports |
| 492 |
* time-out objects. Inventory Reset changed (takes a level of reset |
| 493 |
* now). Quad lasers stay across level change (single player). Guidebot |
| 494 |
* bug fixed (now back in ship on level start). Quads time out when |
| 495 |
* spewed. Invulnerability and cloak powerups no longer use game |
| 496 |
* event/callbacks, so they can be saved in game saves (moved to |
| 497 |
* MakePlayerInvulnerable and MakeObjectInvisible) |
| 498 |
* |
| 499 |
* 386 2/25/99 12:44p Jason |
| 500 |
* fixed some major multiplayer bugs |
| 501 |
* |
| 502 |
* 385 2/25/99 11:53a Jason |
| 503 |
* fixed marker bug |
| 504 |
* |
| 505 |
* 384 2/25/99 10:59a Matt |
| 506 |
* Added new explosion system. |
| 507 |
* |
| 508 |
* 383 2/25/99 10:30a Jason |
| 509 |
* added nonvis generic/robot system |
| 510 |
* |
| 511 |
* 382 2/24/99 1:01p Jason |
| 512 |
* various fixes for multiplayer |
| 513 |
* |
| 514 |
* 381 2/24/99 11:21a Jason |
| 515 |
* Fixed bugs for OEM build |
| 516 |
* |
| 517 |
* 380 2/23/99 5:07p Kevin |
| 518 |
* Fixed a bug in the multi-xfer |
| 519 |
* |
| 520 |
* 379 2/23/99 5:00p Jason |
| 521 |
* took out mprintfs |
| 522 |
* |
| 523 |
* 378 2/23/99 4:59p Jason |
| 524 |
* fixed another marker problem |
| 525 |
* |
| 526 |
* 377 2/23/99 3:32p Jason |
| 527 |
* fixed marker bug |
| 528 |
* |
| 529 |
* 376 2/22/99 4:02p Kevin |
| 530 |
* Checked CRC before using file in multiplayer file exchange system |
| 531 |
* |
| 532 |
* 375 2/21/99 10:23a Kevin |
| 533 |
* Put in 32k limit for multiplayer in game file xfers |
| 534 |
* |
| 535 |
* 374 2/17/99 2:12p Jason |
| 536 |
* fixed up some coop vis issues |
| 537 |
* |
| 538 |
* 373 2/17/99 2:08p Jason |
| 539 |
* fixed observer mode |
| 540 |
* |
| 541 |
* 372 2/16/99 3:46p Jason |
| 542 |
* added marker updates to multiplayer server stream |
| 543 |
* |
| 544 |
* 371 2/15/99 4:10p Jason |
| 545 |
* made non-vis ships kill all their attached sounds/objects |
| 546 |
* |
| 547 |
* 370 2/15/99 11:21a Jason |
| 548 |
* ripped out client side interpolation |
| 549 |
* |
| 550 |
* 369 2/13/99 12:35a Jeff |
| 551 |
* fixed up packets to handle new inventory system (removed some compiler |
| 552 |
* warnings) |
| 553 |
* |
| 554 |
* 368 2/12/99 5:36p Jason |
| 555 |
* temp hacks for permissable client server |
| 556 |
* |
| 557 |
* 367 2/12/99 3:37p Jason |
| 558 |
* added client-side interpolation...its not fully debugged though. |
| 559 |
* |
| 560 |
* 366 2/10/99 3:48p Jason |
| 561 |
* table filter changes |
| 562 |
* |
| 563 |
* 365 2/10/99 1:47p Matt |
| 564 |
* Changed object handle symbolic constants |
| 565 |
* |
| 566 |
* 364 2/09/99 6:52p Jeff |
| 567 |
* implemented 'typing inidcator' in multiplayer...players that are typing |
| 568 |
* messages have an icon on them |
| 569 |
* |
| 570 |
* 363 2/08/99 5:25p Jeff |
| 571 |
* removed all calls to MultiSendRemoveObject, incorportated into |
| 572 |
* SetObjectDeadFlag. Fixes sequencing issues in multiplayer |
| 573 |
* |
| 574 |
* 362 2/04/99 7:18p Jeff |
| 575 |
* sounds for hud messages |
| 576 |
* |
| 577 |
* 361 2/04/99 12:26p Jason |
| 578 |
* added spew that was better for multiplayer |
| 579 |
* |
| 580 |
* 360 2/04/99 11:36a Jason |
| 581 |
* fixed some multi bugs |
| 582 |
* |
| 583 |
* 359 2/04/99 11:01a Jason |
| 584 |
* added anti cheating to multiplayer |
| 585 |
* |
| 586 |
* 358 2/03/99 6:32p Jason |
| 587 |
* more changes for world states |
| 588 |
* |
| 589 |
* 357 2/03/99 4:26p Jason |
| 590 |
* made multiplayer coop actually work! |
| 591 |
* |
| 592 |
* 356 2/03/99 4:20p Kevin |
| 593 |
* Got multiplayer working with .mn3 files, and setup autodownloading |
| 594 |
* |
| 595 |
* 355 2/02/99 8:43a Chris |
| 596 |
* I made buildings with AI work correctly (ie really big robots should be |
| 597 |
* buildings) |
| 598 |
* anim to and from states are now shorts instead of bytes |
| 599 |
* |
| 600 |
* 354 2/01/99 3:47p Jason |
| 601 |
* added more multisafe functionality |
| 602 |
* |
| 603 |
* 353 1/31/99 7:26p Matt |
| 604 |
* Renamed a bunch of functions to have HUD capitalized |
| 605 |
* |
| 606 |
* 352 1/31/99 3:44p Matt |
| 607 |
* Streamlined game sequencing |
| 608 |
* |
| 609 |
* 351 1/31/99 1:03a Jason |
| 610 |
* made multiplayer code leaner |
| 611 |
* |
| 612 |
* 350 1/29/99 5:22p Jeff |
| 613 |
* localization |
| 614 |
* |
| 615 |
* 349 1/28/99 6:17p Jason |
| 616 |
* added markers |
| 617 |
* |
| 618 |
* 348 1/27/99 5:47p Jeff |
| 619 |
* audio taunts implemented! |
| 620 |
* |
| 621 |
* 347 1/26/99 3:25p Jason |
| 622 |
* fixed room change flag problem |
| 623 |
* |
| 624 |
* 346 1/22/99 4:06p Jeff |
| 625 |
* added hud messages that can be sent to just teammates or individual |
| 626 |
* people |
| 627 |
* |
| 628 |
* 345 1/21/99 11:15p Jeff |
| 629 |
* pulled out some structs and defines from header files and moved them |
| 630 |
* into seperate header files so that multiplayer dlls don't require major |
| 631 |
* game headers, just those new headers. Side effect is a shorter build |
| 632 |
* time. Also cleaned up some header file #includes that weren't needed. |
| 633 |
* This affected polymodel.h, object.h, player.h, vecmat.h, room.h, |
| 634 |
* manage.h and multi.h |
| 635 |
* |
| 636 |
* 344 1/21/99 12:38p Jason |
| 637 |
* fixed vis problem |
| 638 |
* |
| 639 |
* 343 1/20/99 8:06p Jeff |
| 640 |
* added members into DLLinfo struct for game change segment events, pass |
| 641 |
* them over on execute dll packets |
| 642 |
* |
| 643 |
* 342 1/20/99 2:13a Chris |
| 644 |
* It is now possible for robots to have special immunities, resistances, |
| 645 |
* and vunerabilities |
| 646 |
* |
| 647 |
* 341 1/19/99 7:17p Jeff |
| 648 |
* fixed powerup pickup problem (Jason) |
| 649 |
* |
| 650 |
* 340 1/18/99 2:46p Matt |
| 651 |
* Combined flags & flags2 fields in object struct |
| 652 |
* |
| 653 |
* 339 1/18/99 11:10a Jason |
| 654 |
* fixed packet mangling problems |
| 655 |
* |
| 656 |
* 338 1/17/99 11:58p Jeff |
| 657 |
* removed call to the change seg event for player, since it's done in |
| 658 |
* ObjSetPos(). Also send over collide data on collide event |
| 659 |
* (EVT_CLIENT_GAMECOLLIDE) |
| 660 |
* |
| 661 |
* 337 1/17/99 10:58p Jason |
| 662 |
* Took out autolag problems, plus added checksum to each packet |
| 663 |
* |
| 664 |
* 336 1/15/99 7:52p Chris |
| 665 |
* Updated ObjSetPos() to include a f_update_attach_children flag |
| 666 |
* |
| 667 |
* 335 1/15/99 2:33p Jason |
| 668 |
* fixed multiplayer ping bug |
| 669 |
* |
| 670 |
* 334 1/15/99 3:52a Jeff |
| 671 |
* the Multi Do DLL Event function has more data being packed into it |
| 672 |
* (point and normal from DLLInfo) for collision data |
| 673 |
* |
| 674 |
* 333 1/14/99 4:23p Jason |
| 675 |
* fixed join bug with dead players |
| 676 |
* |
| 677 |
* 332 1/13/99 3:37p Jason |
| 678 |
* made match collisions less likely to happen by complicating the hash |
| 679 |
* generation process |
| 680 |
* |
| 681 |
* 331 1/13/99 2:56p Jason |
| 682 |
* more work on world states |
| 683 |
* |
| 684 |
* 330 1/13/99 2:53p Jason |
| 685 |
* added CONNECT_BAIL packet type |
| 686 |
* |
| 687 |
* 329 1/13/99 12:43p Jason |
| 688 |
* fixed flickering exit menu screen |
| 689 |
* |
| 690 |
* 328 1/11/99 12:47p Jason |
| 691 |
* misc changes for polishing |
| 692 |
* |
| 693 |
* 327 1/08/99 2:56p Samir |
| 694 |
* Ripped out OSIRIS1. |
| 695 |
* |
| 696 |
* 326 1/06/99 12:34p Jason |
| 697 |
* misc changes for multiplayer |
| 698 |
* |
| 699 |
* 325 1/05/99 5:09p Jason |
| 700 |
* added permissable server networking (ala Quake/Unreal) to Descent3 |
| 701 |
* |
| 702 |
* 324 1/04/99 8:11p Jason |
| 703 |
* fixed packet loss tracking problem |
| 704 |
* |
| 705 |
* 323 1/04/99 7:58p Jason |
| 706 |
* fixed packet throttling...it didn't work with the new architecture very |
| 707 |
* well! |
| 708 |
* |
| 709 |
* 322 12/30/98 5:24p Kevin |
| 710 |
* Added +name to specify a default pilot (for gamespy) fixed a gamespy |
| 711 |
* bug, and improved the pxo dll game list screen |
| 712 |
* |
| 713 |
* 321 12/28/98 2:22p Kevin |
| 714 |
* Initial mission downloading system |
| 715 |
* |
| 716 |
* 320 12/23/98 12:40p Jason |
| 717 |
* made player invul for 1 second when respawning |
| 718 |
* |
| 719 |
* 319 12/21/98 4:04p Jason |
| 720 |
* first pass at multisafe powerups |
| 721 |
* |
| 722 |
* 318 12/21/98 10:22a Jason |
| 723 |
* added auto pps |
| 724 |
* |
| 725 |
* 317 12/18/98 11:40a Jason |
| 726 |
* took out some mprintfs |
| 727 |
* |
| 728 |
* 316 12/16/98 5:37p Jason |
| 729 |
* added new multisafe architecture |
| 730 |
* |
| 731 |
* 315 12/16/98 12:04p Kevin |
| 732 |
* GameSpy! |
| 733 |
* |
| 734 |
* 314 12/15/98 4:20p Jason |
| 735 |
* added triggers and door funtions to multisafe list |
| 736 |
* |
| 737 |
* 313 12/15/98 10:53a Jason |
| 738 |
* yet more changes for 1.1 |
| 739 |
* |
| 740 |
* 312 12/14/98 5:32p Jason |
| 741 |
* added multisafe functions |
| 742 |
* |
| 743 |
* 311 12/14/98 11:06a Jason |
| 744 |
* changes for 1.1 |
| 745 |
* |
| 746 |
* 310 12/10/98 7:09p Jason |
| 747 |
* added cloak fade |
| 748 |
* |
| 749 |
* 309 12/10/98 5:08p Jason |
| 750 |
* more changes for autolag |
| 751 |
* |
| 752 |
* 308 12/10/98 10:51a Jason |
| 753 |
* added autolag |
| 754 |
* |
| 755 |
* 307 12/08/98 4:52p Jeff |
| 756 |
* changed the pilot pics packing to use Ushort instead of short just for |
| 757 |
* my conscience...removed some annoying mprintf's too |
| 758 |
* |
| 759 |
* 306 12/07/98 6:18p Kevin |
| 760 |
* Fixed writing pxo stats when ending the level via timer, etc.... |
| 761 |
* |
| 762 |
* 305 12/07/98 3:02p Jason |
| 763 |
* added multi_logo_state |
| 764 |
* |
| 765 |
* 304 12/04/98 7:05p Jason |
| 766 |
* fixed problems with peer 2 peer |
| 767 |
* |
| 768 |
* 303 12/04/98 3:31p Jason |
| 769 |
* fixed error in server address |
| 770 |
* |
| 771 |
* 302 12/03/98 3:39p Jason |
| 772 |
* added peer 2 peer style damage |
| 773 |
* |
| 774 |
* 301 12/02/98 10:30a Jason |
| 775 |
* added additional damage types for client-side multiplayer |
| 776 |
* |
| 777 |
* 300 12/01/98 5:48p Jeff |
| 778 |
* added pilot picture id to netplayer struct |
| 779 |
* |
| 780 |
* 299 12/01/98 3:38p Jason |
| 781 |
* send over energy for players |
| 782 |
* |
| 783 |
* 298 11/23/98 3:11p Kevin |
| 784 |
* Demo system |
| 785 |
* |
| 786 |
* 297 11/23/98 1:50p Jason |
| 787 |
* added thruster sounds |
| 788 |
* |
| 789 |
* 296 11/19/98 11:27a Jason |
| 790 |
* added Multi_accept_state for Jeff |
| 791 |
* |
| 792 |
* 295 11/16/98 4:46p Jason |
| 793 |
* changes for multiplayer (weapons load sent and deleting destroyed |
| 794 |
* lightmapped objects) |
| 795 |
* |
| 796 |
* 294 11/13/98 4:25p Jason |
| 797 |
* changes for better weapon effects |
| 798 |
* |
| 799 |
* 293 11/13/98 12:30p Jason |
| 800 |
* changes for weapons |
| 801 |
* |
| 802 |
* 292 11/11/98 7:18p Jeff |
| 803 |
* changes made so that a dedicated server's team is always -1 (team game |
| 804 |
* or not) |
| 805 |
* |
| 806 |
* 291 11/11/98 12:11p Chris |
| 807 |
* The attach system and weapon firing (continous and spray) are now |
| 808 |
* network friendly |
| 809 |
* |
| 810 |
* 290 11/10/98 4:29p Kevin |
| 811 |
* Added attach code for chris |
| 812 |
* |
| 813 |
* 289 11/10/98 11:16a Jason |
| 814 |
* fixed some multiplayer bugs with powerups disappearing |
| 815 |
* |
| 816 |
* |
| 817 |
* 288 11/06/98 5:43p Jason |
| 818 |
* made pings sent not reliably |
| 819 |
* |
| 820 |
* 287 11/03/98 6:16p Chris |
| 821 |
* Starting to make on/off and spray weapons accessable to robots |
| 822 |
* |
| 823 |
* 286 11/02/98 6:53p Jason |
| 824 |
* made different game versions not show up in game list |
| 825 |
* |
| 826 |
* 285 11/02/98 6:41p Jason |
| 827 |
* fixed release problems |
| 828 |
* |
| 829 |
* 284 10/30/98 4:24p Jason |
| 830 |
* changes for multiplayer |
| 831 |
* |
| 832 |
* 283 10/29/98 5:08p Jason |
| 833 |
* took out a couple mprintfs |
| 834 |
* |
| 835 |
* 282 10/28/98 5:25p Jason |
| 836 |
* fixed player death problems in multiplayer |
| 837 |
* |
| 838 |
* 281 10/28/98 5:07p Jason |
| 839 |
* more changes for cleaner multiplayer |
| 840 |
* |
| 841 |
* 280 10/28/98 11:51a Jason |
| 842 |
* fixed some multiplayer problems, plus redid coop a bit to make it |
| 843 |
* cleaner |
| 844 |
* |
| 845 |
* 279 10/27/98 10:19a Jason |
| 846 |
* changes for new arch |
| 847 |
* |
| 848 |
* 278 10/22/98 12:28p Kevin |
| 849 |
* Fixed pings in peer-peer |
| 850 |
* |
| 851 |
* 277 10/22/98 10:39a Kevin |
| 852 |
* Fixed DirectPlay |
| 853 |
* |
| 854 |
* 276 10/21/98 7:05p Jeff |
| 855 |
* removed int3 |
| 856 |
* |
| 857 |
* 275 10/21/98 5:03p Jeff |
| 858 |
* you can only go into observer mode if you are >50 shields |
| 859 |
* |
| 860 |
* 274 10/21/98 3:04p Kevin |
| 861 |
* |
| 862 |
* 273 10/21/98 9:48a Kevin |
| 863 |
* took out some debugging code and mprintfs |
| 864 |
* |
| 865 |
* 272 10/20/98 5:46p Kevin |
| 866 |
* Gunboy and other fixes |
| 867 |
* |
| 868 |
* 271 10/20/98 1:48p Jason |
| 869 |
* fixed some reliable/unreliable problems |
| 870 |
* |
| 871 |
* 270 10/20/98 1:38p Kevin |
| 872 |
* added mprintf's for debugging |
| 873 |
* |
| 874 |
* 269 10/20/98 2:53a Kevin |
| 875 |
* gunboy crap |
| 876 |
* |
| 877 |
* 268 10/20/98 12:39a Jason |
| 878 |
* took out erroneous checks |
| 879 |
* |
| 880 |
* 267 10/20/98 12:12a Jason |
| 881 |
* fixed stupid bug |
| 882 |
* |
| 883 |
* 266 10/19/98 11:46p Jason |
| 884 |
* changes for multiplayer debug layer |
| 885 |
* |
| 886 |
* 265 10/19/98 11:20p Matt |
| 887 |
* Changed some bytes type ubytes, since bytes are unsigned anyway. |
| 888 |
* |
| 889 |
* 264 10/19/98 10:37p Jeff |
| 890 |
* |
| 891 |
* 263 10/19/98 7:51p Kevin |
| 892 |
* performance testing |
| 893 |
* |
| 894 |
* 262 10/19/98 7:18p Matt |
| 895 |
* Added system to support different types of damage to the player and |
| 896 |
* have these different types make different sounds. |
| 897 |
* |
| 898 |
* 261 10/19/98 5:17p Jason |
| 899 |
* fixed some vis issues (hopefully for good) |
| 900 |
* |
| 901 |
* 260 10/19/98 5:07p Jason |
| 902 |
* put vis stuff back in |
| 903 |
* |
| 904 |
* 259 10/18/98 7:59p Jeff |
| 905 |
* the function used to see if a player is banned has new prototype |
| 906 |
* |
| 907 |
* 258 10/18/98 2:59p Jason |
| 908 |
* fixes for beta4 |
| 909 |
* |
| 910 |
* 257 10/17/98 12:46p Kevin |
| 911 |
* Beta 4 fixes |
| 912 |
* |
| 913 |
* 256 10/16/98 3:19p Jason |
| 914 |
* now checks to see if persistant data is same on client/server |
| 915 |
* |
| 916 |
* 255 10/16/98 2:52p Jason |
| 917 |
* trying to debug world states |
| 918 |
* |
| 919 |
* 254 10/16/98 2:24p Jason |
| 920 |
* changes for the demo |
| 921 |
* |
| 922 |
* 253 10/16/98 1:54p Kevin |
| 923 |
* Changes for Demo Beta 4 |
| 924 |
* |
| 925 |
* 252 10/16/98 11:55a Kevin |
| 926 |
* Made dlls loadable in a hog |
| 927 |
* |
| 928 |
* 251 10/14/98 11:23p Jeff |
| 929 |
* removed hud messages on player join |
| 930 |
* |
| 931 |
* 250 10/14/98 1:02p Jason |
| 932 |
* fixed FindSoundName issues |
| 933 |
* |
| 934 |
* 249 10/14/98 11:46a Jason |
| 935 |
* made camera scripts work correctly |
| 936 |
* |
| 937 |
* 248 10/13/98 9:26p Jason |
| 938 |
* trying to track down wind problems |
| 939 |
* |
| 940 |
* 247 10/13/98 2:16a Jeff |
| 941 |
* added call to EVT_GAME_DISCONNECTED in MultiLeaveGame() |
| 942 |
* |
| 943 |
* 246 10/11/98 2:57a Jeff |
| 944 |
* added new multiplayer event EVT_GAME_INTERVAL, which is to be called on |
| 945 |
* interval, and EVT_HUD_INTERVAL is only to be called when the hud is to |
| 946 |
* be rendered |
| 947 |
* |
| 948 |
* 245 10/08/98 7:30p Samir |
| 949 |
* game sequencing changes. |
| 950 |
* |
| 951 |
* 244 10/08/98 3:38p Jeff |
| 952 |
* removed time_left from Netgame |
| 953 |
* |
| 954 |
* 243 10/07/98 5:05p Jason |
| 955 |
* added quaded weapons |
| 956 |
* |
| 957 |
* 242 10/07/98 1:06p Jason |
| 958 |
* added more safety precautions |
| 959 |
* |
| 960 |
* 241 10/07/98 10:25a Jason |
| 961 |
* Now send damage reliably |
| 962 |
* |
| 963 |
* 240 10/06/98 6:07p Jason |
| 964 |
* added protective layer for reliable packets |
| 965 |
* |
| 966 |
* 239 10/06/98 4:00p Jason |
| 967 |
* Reset a players ship at the beginning of a new level |
| 968 |
* |
| 969 |
* 238 10/05/98 7:23p Jason |
| 970 |
* added protective layer onto multiplayer |
| 971 |
* |
| 972 |
* 237 10/05/98 11:08a Jason |
| 973 |
* fixed some potential gap problems in the multiplayer sequencing code |
| 974 |
* |
| 975 |
* 236 10/02/98 3:26p Chris |
| 976 |
* Removed the bug ridden interpolation code |
| 977 |
* |
| 978 |
* 235 10/01/98 4:58p Kevin |
| 979 |
* fixed debug code |
| 980 |
* |
| 981 |
* 234 10/01/98 2:48p Kevin |
| 982 |
* put in debug info for removing a powerup |
| 983 |
* |
| 984 |
* 233 10/01/98 2:09p Jason |
| 985 |
* more fixes to object creation |
| 986 |
* |
| 987 |
* 232 10/01/98 2:07p Jason |
| 988 |
* possible fix for script problems |
| 989 |
* |
| 990 |
* 231 10/01/98 12:41p Jason |
| 991 |
* more world state stuff |
| 992 |
* |
| 993 |
* 230 10/01/98 12:16p Kevin |
| 994 |
* Fixed Ping for Peer-Peer games |
| 995 |
* |
| 996 |
* 229 10/01/98 12:02p Kevin |
| 997 |
* Fixed PXO ping time |
| 998 |
* |
| 999 |
* 228 10/01/98 11:36a Kevin |
| 1000 |
* UI fixes and stuff |
| 1001 |
* |
| 1002 |
* 227 10/01/98 11:29a Jason |
| 1003 |
* changes for world states in multiplayer games |
| 1004 |
* |
| 1005 |
* 226 10/01/98 10:21a Jason |
| 1006 |
* added some testing mprintfs |
| 1007 |
* |
| 1008 |
* 225 9/30/98 6:56p Jason |
| 1009 |
* more changes for DLLS |
| 1010 |
* |
| 1011 |
* 224 9/30/98 6:25p Jason |
| 1012 |
* debugging info for remove object |
| 1013 |
* |
| 1014 |
* 223 9/30/98 5:35p Jason |
| 1015 |
* added multiplayer menu bailing for samir |
| 1016 |
* |
| 1017 |
* 222 9/30/98 3:14p Jason |
| 1018 |
* fixed some possible bugs with -1 objnums and scripts/dlls |
| 1019 |
* |
| 1020 |
* |
| 1021 |
* 219 9/29/98 11:18a Jeff |
| 1022 |
* fixed OBJ_DUMMY problems on client join objects |
| 1023 |
* |
| 1024 |
* 218 9/28/98 6:23p Chris |
| 1025 |
* Changed multi_anim to custom_anim |
| 1026 |
* |
| 1027 |
* 217 9/28/98 6:23p Jason |
| 1028 |
* added persistant data |
| 1029 |
* |
| 1030 |
* 216 9/28/98 12:56p Jason |
| 1031 |
* multiplayer bug fixes |
| 1032 |
* |
| 1033 |
* 215 9/28/98 11:02a Kevin |
| 1034 |
* added Networking defer, and fixed some UI issues |
| 1035 |
* |
| 1036 |
* 214 9/28/98 10:33a Jason |
| 1037 |
* changed all asserts to BailOnMultiplayer for clean exits |
| 1038 |
* |
| 1039 |
* 213 9/28/98 10:06a Jason |
| 1040 |
* fixed some multiplayer bugs |
| 1041 |
* |
| 1042 |
* 212 9/28/98 9:53a Kevin |
| 1043 |
* Fixing misc UI problems, and fixed some bugs that VC 6 found |
| 1044 |
* |
| 1045 |
* 211 9/25/98 9:25p Jason |
| 1046 |
* turned vis stuff back on |
| 1047 |
* |
| 1048 |
* 210 9/25/98 5:33p Jason |
| 1049 |
* fixed parenting again |
| 1050 |
* |
| 1051 |
* 209 9/25/98 4:21p Jason |
| 1052 |
* more multiplayer bug checking |
| 1053 |
* |
| 1054 |
* 208 9/25/98 3:01p Kevin |
| 1055 |
* fixxed ping code |
| 1056 |
* |
| 1057 |
* 207 9/25/98 12:06a Jason |
| 1058 |
* fixed some multiplayer scripting issues |
| 1059 |
* |
| 1060 |
* 206 9/24/98 4:59p Jason |
| 1061 |
* fixed script bug |
| 1062 |
* |
| 1063 |
* 205 9/24/98 4:41p Jason |
| 1064 |
* handled a multiplayer script problem |
| 1065 |
* |
| 1066 |
* 204 9/22/98 2:29p Kevin |
| 1067 |
* moved ships allowed code out of dll and into main app. Also added |
| 1068 |
* powerup exclusions |
| 1069 |
* |
| 1070 |
* 203 9/15/98 4:31p Jason |
| 1071 |
* added more functionality for the dedicated server |
| 1072 |
* |
| 1073 |
* 202 9/15/98 2:44p Jason |
| 1074 |
* fixed bug with my last rev |
| 1075 |
* |
| 1076 |
* 201 9/15/98 12:47p Jason |
| 1077 |
* made spewed countermeasures work correctly |
| 1078 |
* |
| 1079 |
* 200 9/11/98 12:25p Jason |
| 1080 |
* got energy to shield and fusion damage working in multiplayer |
| 1081 |
* |
| 1082 |
* 199 9/10/98 12:18p Jason |
| 1083 |
* more changes to afterburner/thrust effect |
| 1084 |
* |
| 1085 |
* 198 9/09/98 7:09p Jason |
| 1086 |
* changed afterburner effect for ships |
| 1087 |
* |
| 1088 |
* 197 9/04/98 3:45p Kevin |
| 1089 |
* Added ping_time to Netplayers struct. It's updated in peer-peer and |
| 1090 |
* client server |
| 1091 |
* |
| 1092 |
* 196 9/02/98 6:54p Kevin |
| 1093 |
* Fixed general directplay support up, and got modem-modem working |
| 1094 |
* |
| 1095 |
* 195 9/01/98 11:19a Matt |
| 1096 |
* Re-added wrongly-deleted ResetPlayerObject() call in |
| 1097 |
* MultiStartNewLevel() |
| 1098 |
* |
| 1099 |
* 194 8/31/98 10:14a Kevin |
| 1100 |
* Misc. multi-UI fixes |
| 1101 |
* |
| 1102 |
* 193 8/28/98 1:34p Matt |
| 1103 |
* Added code to reset the waypoint when starting a new level, and while I |
| 1104 |
* was at it cleaned up the new level start sequencing. |
| 1105 |
* |
| 1106 |
* 192 8/26/98 4:30p Jason |
| 1107 |
* added directional lights (headlight for player) |
| 1108 |
* |
| 1109 |
* 191 8/24/98 2:45p Jason |
| 1110 |
* added team start position stuff |
| 1111 |
* |
| 1112 |
* 190 8/19/98 11:49a Kevin |
| 1113 |
* Got DirectPlay IPX working, and localized connection DLLs |
| 1114 |
* |
| 1115 |
* 189 8/15/98 5:16p Matt |
| 1116 |
* Added new Base_directory variable. Got rid of D3_LOCAL check and |
| 1117 |
* 'local directory' registry variable. |
| 1118 |
* |
| 1119 |
* 188 8/13/98 6:32p Kevin |
| 1120 |
* Initial implementation of directplay API |
| 1121 |
* |
| 1122 |
* 187 8/13/98 6:09p Jason |
| 1123 |
* addendum to my last rev....made it work with REMOVE_OBJECT packet |
| 1124 |
* |
| 1125 |
* 186 8/13/98 6:08p Jason |
| 1126 |
* Fixed blowing up of robots |
| 1127 |
* |
| 1128 |
* 185 8/12/98 6:36p Jeff |
| 1129 |
* converted the send link/unlink functions to handle ghosted objects. |
| 1130 |
* Updated MultiSendObject to handle dummy objects |
| 1131 |
* |
| 1132 |
* 184 8/12/98 11:54a Jeff |
| 1133 |
* added link/unlink object packets |
| 1134 |
* |
| 1135 |
* 183 8/10/98 5:27p Kevin |
| 1136 |
* fixed coop bug with tubs |
| 1137 |
* |
| 1138 |
* 182 8/10/98 4:58p Kevin |
| 1139 |
* Send robot orientation as 3 angles |
| 1140 |
* |
| 1141 |
* 181 8/10/98 2:21p Jeff |
| 1142 |
* changes made due to adding flag for inventory reset |
| 1143 |
* |
| 1144 |
* 180 8/07/98 6:03p Jason |
| 1145 |
* took out magnitude shift for player positions |
| 1146 |
* |
| 1147 |
* 179 8/07/98 12:27p Kevin |
| 1148 |
* Added network stuff for energy/shield conversion |
| 1149 |
* |
| 1150 |
* 178 8/05/98 6:59p Kevin |
| 1151 |
* |
| 1152 |
* 177 8/05/98 2:25p Kevin |
| 1153 |
* improved network address reporting |
| 1154 |
* |
| 1155 |
* 176 8/05/98 11:48a Kevin |
| 1156 |
* |
| 1157 |
* 175 8/05/98 10:46a Kevin |
| 1158 |
* sound & bmp exchange fixes |
| 1159 |
* |
| 1160 |
* 174 8/04/98 6:13p Kevin |
| 1161 |
* fixes for sound & bmp exchange |
| 1162 |
* |
| 1163 |
* 173 8/04/98 3:07p Kevin |
| 1164 |
* sound & bmp exchange fixes for > 2 players |
| 1165 |
* |
| 1166 |
* 172 8/04/98 10:26a Kevin |
| 1167 |
* Custom sound and bmp exchange system |
| 1168 |
* |
| 1169 |
* 171 8/03/98 5:56p Jason |
| 1170 |
* got fusion cannon working correctly |
| 1171 |
* |
| 1172 |
* 170 8/03/98 4:28p Jason |
| 1173 |
* added first pass of spline movement trick |
| 1174 |
* |
| 1175 |
* 169 7/31/98 11:51a Jason |
| 1176 |
* added player ship choosing to multiplayer games |
| 1177 |
* |
| 1178 |
* 168 7/30/98 11:09a Jason |
| 1179 |
* took out warp effect |
| 1180 |
* |
| 1181 |
* 167 7/29/98 6:40p Jason |
| 1182 |
* fixed on/off problem |
| 1183 |
* |
| 1184 |
* 166 7/29/98 5:47p Jason |
| 1185 |
* added warp effect again |
| 1186 |
* |
| 1187 |
* 165 7/29/98 5:39p Kevin |
| 1188 |
* sound/bitmap exchange |
| 1189 |
* |
| 1190 |
* 164 7/29/98 2:29p Jason |
| 1191 |
* got rid of some compiler warnings |
| 1192 |
* |
| 1193 |
* 163 7/29/98 2:02p Jason |
| 1194 |
* implemented multiplayer positional flags to help trim bandwidth |
| 1195 |
* consumption |
| 1196 |
* |
| 1197 |
* 162 7/29/98 12:40p Jason |
| 1198 |
* more multiplayer testing for occlusion and packet sequencing |
| 1199 |
* |
| 1200 |
* 161 7/28/98 3:42p Jason |
| 1201 |
* added positional sequencing back in |
| 1202 |
* |
| 1203 |
* 160 7/28/98 12:43p Jason |
| 1204 |
* trying a multiplayer experiment with a compressed orientation matrix |
| 1205 |
* |
| 1206 |
* |
| 1207 |
* 159 7/28/98 12:29p Jason |
| 1208 |
* added rotational velocity to multiplayer position packets |
| 1209 |
* |
| 1210 |
* 158 7/27/98 5:59p Jason |
| 1211 |
* added piggyback mode plus multiplayer colors |
| 1212 |
* |
| 1213 |
* 157 7/27/98 5:31p Kevin |
| 1214 |
* Sound/Bitmap exchange system |
| 1215 |
* |
| 1216 |
* 156 7/24/98 4:44p Jason |
| 1217 |
* added temporary multi_occluded variable |
| 1218 |
* |
| 1219 |
* 155 7/23/98 12:38p Jason |
| 1220 |
* more tweaks for multiplayer vis stuff |
| 1221 |
* |
| 1222 |
* 154 7/22/98 3:16p Jason |
| 1223 |
* added observer mode |
| 1224 |
* |
| 1225 |
* 153 7/21/98 2:59p Kevin |
| 1226 |
* peer-peer fire packets |
| 1227 |
* |
| 1228 |
* 152 7/21/98 1:49p Kevin |
| 1229 |
* IPX support and peer-peer option for multi |
| 1230 |
* |
| 1231 |
* 151 7/21/98 12:07p Jason |
| 1232 |
* made multiplayer work with BOA vis system |
| 1233 |
* |
| 1234 |
* 150 7/21/98 10:27a Kevin |
| 1235 |
* peer-peer fixes |
| 1236 |
* |
| 1237 |
* 149 7/20/98 7:23p Jeff |
| 1238 |
* fixed peer-peer/client server booboo |
| 1239 |
* |
| 1240 |
* 148 7/20/98 6:39p Jason |
| 1241 |
* first attempt at getting player visibilty stuff working in multiplayer |
| 1242 |
* |
| 1243 |
* 147 7/20/98 6:20p Kevin |
| 1244 |
* peer-peer stuff |
| 1245 |
* |
| 1246 |
* 146 7/17/98 5:57p Jason |
| 1247 |
* misc multiplayer changes |
| 1248 |
* |
| 1249 |
* 145 7/17/98 2:50p Jason |
| 1250 |
* a couple fixes for multiplayer bugs |
| 1251 |
* |
| 1252 |
* 144 7/17/98 1:22p Kevin |
| 1253 |
* Dynamic retransmission of reliable packets and stuff |
| 1254 |
* |
| 1255 |
* 143 7/15/98 1:22p Kevin |
| 1256 |
* Updated player network address for clients |
| 1257 |
* |
| 1258 |
* 142 7/15/98 12:48p Jeff |
| 1259 |
* sending client execute DLLs now allows a dllinfo struct to be passed |
| 1260 |
* |
| 1261 |
* 141 7/15/98 12:27p Kevin |
| 1262 |
* Fixed bug in execscriptwithparms and references |
| 1263 |
* |
| 1264 |
* 140 7/15/98 11:21a Kevin |
| 1265 |
* Added doors to the server object list |
| 1266 |
* |
| 1267 |
* 139 7/15/98 10:38a Kevin |
| 1268 |
* Fixes erroneous debug warning in multidomsgwithparms |
| 1269 |
* |
| 1270 |
* 138 7/14/98 5:52p Kevin |
| 1271 |
* Packet loss measurements and auto pps adjusting |
| 1272 |
* |
| 1273 |
* 137 7/13/98 11:52a Kevin |
| 1274 |
* Added Callscriptwithparms |
| 1275 |
* |
| 1276 |
* 136 7/10/98 10:29a Kevin |
| 1277 |
* Added parent handle to sendobj |
| 1278 |
* |
| 1279 |
* 135 7/09/98 4:50p Kevin |
| 1280 |
* added render type to multisendobj |
| 1281 |
* |
| 1282 |
* 134 7/09/98 3:26p Jason |
| 1283 |
* fixed scripting name bug |
| 1284 |
* |
| 1285 |
* 133 7/08/98 6:01p Jeff |
| 1286 |
* added packet to remove an item from inventory |
| 1287 |
* |
| 1288 |
* 132 7/08/98 5:31p Kevin |
| 1289 |
* Coop fixes |
| 1290 |
* |
| 1291 |
* 131 7/08/98 11:35a Kevin |
| 1292 |
* weapon battery info |
| 1293 |
* |
| 1294 |
* 130 7/08/98 11:27a Jeff |
| 1295 |
* removed yesterdays inventory functions, since inventory.cpp has been |
| 1296 |
* rolled back...its outdated now |
| 1297 |
* |
| 1298 |
* 129 7/07/98 7:33p Jeff |
| 1299 |
* changes made for inventory use |
| 1300 |
* |
| 1301 |
* 128 7/07/98 6:31p Jason |
| 1302 |
* fixed jeffery thang |
| 1303 |
* |
| 1304 |
* 127 7/07/98 3:46p Kevin |
| 1305 |
* Turrett info |
| 1306 |
* |
| 1307 |
* 126 7/07/98 3:26p Chris |
| 1308 |
* Added changes for turret updates |
| 1309 |
* |
| 1310 |
* 125 7/07/98 3:16p Kevin |
| 1311 |
* Added inventory parms |
| 1312 |
* |
| 1313 |
* 124 7/07/98 2:48p Kevin |
| 1314 |
* added support for custom scripts in multisendobject |
| 1315 |
* |
| 1316 |
* 123 7/07/98 11:19a Kevin |
| 1317 |
* Added inventory use message |
| 1318 |
* |
| 1319 |
* 122 7/07/98 10:10a Kevin |
| 1320 |
* Added basic turret support for coop |
| 1321 |
* |
| 1322 |
* 121 7/06/98 6:46p Kevin |
| 1323 |
* vector parameter passing in scripts |
| 1324 |
* |
| 1325 |
* 120 7/06/98 5:36p Kevin |
| 1326 |
* Variable parameter passing |
| 1327 |
* |
| 1328 |
* 119 7/06/98 11:51a Jason |
| 1329 |
* added accessor function for countermeasures |
| 1330 |
* |
| 1331 |
* 118 7/06/98 9:34a Kevin |
| 1332 |
* coop |
| 1333 |
* |
| 1334 |
* 117 7/02/98 4:52p Kevin |
| 1335 |
* coop fixes |
| 1336 |
* |
| 1337 |
* 116 7/02/98 12:57p Jason |
| 1338 |
* various changes for multiplayer positional sequencing |
| 1339 |
* |
| 1340 |
* 115 7/02/98 12:19p Kevin |
| 1341 |
* misc network fixes |
| 1342 |
* |
| 1343 |
* 114 7/02/98 10:39a Kevin |
| 1344 |
* More coop stuff |
| 1345 |
* |
| 1346 |
* 113 7/01/98 6:30p Kevin |
| 1347 |
* More coop |
| 1348 |
* |
| 1349 |
* 112 7/01/98 2:52p Kevin |
| 1350 |
* coop -- adding sound index |
| 1351 |
* |
| 1352 |
* 111 7/01/98 12:55p Jason |
| 1353 |
* more changes for countermeasures |
| 1354 |
* |
| 1355 |
* 110 7/01/98 12:46p Kevin |
| 1356 |
* Coop fixes |
| 1357 |
* |
| 1358 |
* 109 7/01/98 12:11p Jason |
| 1359 |
* added countermeasures |
| 1360 |
* |
| 1361 |
* 108 6/30/98 7:17p Kevin |
| 1362 |
* more animation stuff |
| 1363 |
* |
| 1364 |
* 107 6/30/98 5:54p Kevin |
| 1365 |
* Animation frame stuff |
| 1366 |
* |
| 1367 |
* 106 6/30/98 5:08p Kevin |
| 1368 |
* coop animation frame stuff |
| 1369 |
* |
| 1370 |
* 105 6/30/98 4:28p Chris |
| 1371 |
* Checked in some missing commas |
| 1372 |
* |
| 1373 |
* 104 6/30/98 3:55p Chris |
| 1374 |
* |
| 1375 |
* 103 6/30/98 3:22p Kevin |
| 1376 |
* Improved game ping time |
| 1377 |
* |
| 1378 |
* 102 6/30/98 11:39a Jason |
| 1379 |
* added AdditionalDamage packet type for multiplayer |
| 1380 |
* |
| 1381 |
* 101 6/30/98 10:10a Kevin |
| 1382 |
* Fix to prevent your old games from showing up in game list |
| 1383 |
* |
| 1384 |
* 100 6/29/98 5:53p Kevin |
| 1385 |
* Coop |
| 1386 |
* |
| 1387 |
* 99 6/29/98 3:08p Jason |
| 1388 |
* added on/off weapons |
| 1389 |
* |
| 1390 |
* 98 6/29/98 12:49p Jason |
| 1391 |
* temp checkin for on/off weapons |
| 1392 |
* |
| 1393 |
* 97 6/29/98 12:12p Kevin |
| 1394 |
* Added robot damage and death packets |
| 1395 |
* |
| 1396 |
* 96 6/26/98 6:53p Kevin |
| 1397 |
* Coop mode |
| 1398 |
* |
| 1399 |
* 95 6/26/98 6:20p Jason |
| 1400 |
* changes for coop |
| 1401 |
* |
| 1402 |
* 94 6/25/98 5:22p Kevin |
| 1403 |
* Req/Send gametime to clients |
| 1404 |
* |
| 1405 |
* 93 6/25/98 12:32p Jason |
| 1406 |
* added new multiplayer functionality |
| 1407 |
* |
| 1408 |
* 92 6/24/98 3:24p Kevin |
| 1409 |
* Updated PXO screens with chat, etc. |
| 1410 |
* |
| 1411 |
* 91 6/18/98 4:49p Kevin |
| 1412 |
* Updated multiplayer menus |
| 1413 |
* |
| 1414 |
* 90 6/16/98 10:54a Jeff |
| 1415 |
* |
| 1416 |
* 89 6/11/98 12:48p Jason |
| 1417 |
* added better spewing weapons |
| 1418 |
* |
| 1419 |
* 88 6/10/98 7:32p Kevin |
| 1420 |
* nw_CloseSocket wasn't being called in MultiDoLeaveGame |
| 1421 |
* |
| 1422 |
* 87 6/09/98 6:18p Jeff |
| 1423 |
* added a call to the multiplayer DLL when level ends and when a player |
| 1424 |
* leaves the game |
| 1425 |
* |
| 1426 |
* 86 6/04/98 4:53p Jeff |
| 1427 |
* Online time is kept whether or not it's a mastertracker game now |
| 1428 |
* |
| 1429 |
* 85 6/01/98 10:09a Kevin |
| 1430 |
* Added DLL connection interface and auto update DLL |
| 1431 |
* |
| 1432 |
* 84 5/25/98 6:38p Matt |
| 1433 |
* Added needed include. |
| 1434 |
* |
| 1435 |
* 83 5/22/98 11:59a Chris |
| 1436 |
* Fixed improper uses of FindSoundName and made the proper static sounds |
| 1437 |
* |
| 1438 |
* 82 5/19/98 6:27p Jason |
| 1439 |
* put in urgent packets |
| 1440 |
* |
| 1441 |
* 81 5/14/98 6:17p Jason |
| 1442 |
* more sequencing bugs squashed |
| 1443 |
* |
| 1444 |
* 80 5/14/98 5:27p Jason |
| 1445 |
* fixed some more sequencing bugs |
| 1446 |
* |
| 1447 |
* 79 5/14/98 11:07a Kevin |
| 1448 |
* Made gameover packet to the tracker reliable |
| 1449 |
* |
| 1450 |
* 78 5/13/98 4:06p Kevin |
| 1451 |
* Added more mastertracker info |
| 1452 |
* |
| 1453 |
* 77 5/12/98 6:11p Kevin |
| 1454 |
* Added mastertracker values |
| 1455 |
* |
| 1456 |
* 76 5/12/98 5:49p Jason |
| 1457 |
* fixed some multiplayer bugs |
| 1458 |
* |
| 1459 |
* 75 5/12/98 5:12p Jason |
| 1460 |
* added dll callable level ending |
| 1461 |
* |
| 1462 |
* 74 5/12/98 4:18p Jason |
| 1463 |
* added better level sequencing for multiplayer |
| 1464 |
* |
| 1465 |
* 73 5/12/98 12:33p Jason |
| 1466 |
* got level sequencing working in multiplayer |
| 1467 |
* |
| 1468 |
* 72 5/11/98 4:40p Chris |
| 1469 |
* AI info is now a malloc'ed pointer |
| 1470 |
* |
| 1471 |
* 71 5/11/98 11:31a Jason |
| 1472 |
* added some events for level sequencing |
| 1473 |
* |
| 1474 |
* 70 5/08/98 6:23p Jason |
| 1475 |
* tweaked player positioning |
| 1476 |
* |
| 1477 |
* 69 5/07/98 5:08p Jason |
| 1478 |
* added better movement interpolation |
| 1479 |
* |
| 1480 |
* 68 5/05/98 3:02p Jason |
| 1481 |
* attempting to add different screen resolutions |
| 1482 |
* |
| 1483 |
* 67 5/04/98 4:04p Chris |
| 1484 |
* Minestone checkin' -- energy effect and more AI functionality |
| 1485 |
* |
| 1486 |
* 66 5/04/98 12:48p Jason |
| 1487 |
* fixed goalface problem |
| 1488 |
* |
| 1489 |
* 65 5/04/98 10:55a Kevin |
| 1490 |
* Mastertracker fixes/enhancements |
| 1491 |
* |
| 1492 |
* 64 5/02/98 5:14p Kevin |
| 1493 |
* Made mastertracker games not show up on the lan search |
| 1494 |
* |
| 1495 |
* 63 4/30/98 3:49p Kevin |
| 1496 |
* Mastertracker pilot stats |
| 1497 |
* |
| 1498 |
* 62 4/27/98 1:14p Jason |
| 1499 |
* cleaned up afterburner stuff |
| 1500 |
* |
| 1501 |
* 61 4/24/98 3:50p Kevin |
| 1502 |
* Added mastertracker game tracking support |
| 1503 |
* |
| 1504 |
* 60 4/22/98 3:39p Jason |
| 1505 |
* trimmed some fat off player packets |
| 1506 |
* |
| 1507 |
* 59 4/22/98 3:29p Jason |
| 1508 |
* reset player ship when entering a game |
| 1509 |
* |
| 1510 |
* 58 4/22/98 3:25p Jason |
| 1511 |
* changes for multiplayer debugging |
| 1512 |
* |
| 1513 |
* 57 4/20/98 12:46p Jason |
| 1514 |
* added level checksumming for multiplayer games |
| 1515 |
* |
| 1516 |
* 56 4/20/98 11:30a Jason |
| 1517 |
* Added ShowProgressScreen function |
| 1518 |
* |
| 1519 |
* 55 4/19/98 3:21p Jason |
| 1520 |
* added the transmission of teams when a player connects |
| 1521 |
* |
| 1522 |
* 54 4/17/98 1:59p Jason |
| 1523 |
* added cool object effects |
| 1524 |
* |
| 1525 |
* 53 4/17/98 12:45p Jason |
| 1526 |
* various changes for multiplayer |
| 1527 |
* |
| 1528 |
* 52 4/14/98 7:56p Matt |
| 1529 |
* Moved MSN_NAMELEN from mission.h to descent,h, so multi.h didn't need |
| 1530 |
* to include mission.h. |
| 1531 |
* |
| 1532 |
* 51 4/10/98 3:28p Jason |
| 1533 |
* fixed afterburner bug |
| 1534 |
* |
| 1535 |
* 50 4/10/98 2:58p Chris |
| 1536 |
* Redid where the buddy gets allocated, not all the way done yet. |
| 1537 |
* |
| 1538 |
* 49 4/10/98 2:16p Jason |
| 1539 |
* fixed guided missile problems |
| 1540 |
* |
| 1541 |
* 48 4/09/98 5:17p Jason |
| 1542 |
* got guided working in multiplayer |
| 1543 |
* |
| 1544 |
* 47 4/09/98 2:23p Jason |
| 1545 |
* added guided/afterburner stuff |
| 1546 |
* |
| 1547 |
* 46 4/07/98 4:25p Chris |
| 1548 |
* Added support for buddy bot |
| 1549 |
* |
| 1550 |
* 45 4/07/98 12:54p Jason |
| 1551 |
* changes for viseffects and multiplayer dll |
| 1552 |
* |
| 1553 |
* 44 4/06/98 5:56p Jason |
| 1554 |
* got multiplayer options working |
| 1555 |
* |
| 1556 |
* 43 4/06/98 2:54p Jason |
| 1557 |
* yet more multiplayer changes |
| 1558 |
* |
| 1559 |
* 42 4/06/98 12:14p Jason |
| 1560 |
* changes to multiplayer |
| 1561 |
* |
| 1562 |
* 41 4/03/98 4:08p Jason |
| 1563 |
* fixed checksum bugs |
| 1564 |
* |
| 1565 |
* 40 4/03/98 12:28p Jason |
| 1566 |
* fixed confusion with clients changing rooms in multiplayer |
| 1567 |
* |
| 1568 |
* 39 4/03/98 12:22p Jeff |
| 1569 |
* fixed bug in change room event |
| 1570 |
* |
| 1571 |
* 38 4/03/98 11:04a Jason |
| 1572 |
* added a multplayer dll hook for when a player changes a room |
| 1573 |
* |
| 1574 |
* 37 4/02/98 12:43p Jason |
| 1575 |
* added functions to remove an object |
| 1576 |
* |
| 1577 |
* 36 4/01/98 6:23p Jason |
| 1578 |
* added a slew of stuff for multiplayer |
| 1579 |
* |
| 1580 |
* 35 4/01/98 12:02p Jason |
| 1581 |
* incremental checkin for rendering changes |
| 1582 |
* |
| 1583 |
* 34 3/30/98 5:11p Jason |
| 1584 |
* more changes for game/dll integration |
| 1585 |
* |
| 1586 |
* 33 3/23/98 7:37p Jason |
| 1587 |
* added colored hud messages |
| 1588 |
* |
| 1589 |
* 32 3/23/98 4:51p Jason |
| 1590 |
* incremental checkin for multiplay |
| 1591 |
* |
| 1592 |
* 31 3/20/98 5:51p Jason |
| 1593 |
* more changes for multiplayer |
| 1594 |
* |
| 1595 |
* 30 3/20/98 2:18p Jason |
| 1596 |
* changes for multiplayer |
| 1597 |
* |
| 1598 |
* 29 3/19/98 7:14p Jason |
| 1599 |
* more changes for multiplayer |
| 1600 |
* |
| 1601 |
* 28 3/18/98 5:45p Jason |
| 1602 |
* more multiplayer script integration |
| 1603 |
* |
| 1604 |
* 27 3/18/98 11:08a Jason |
| 1605 |
* more changes for script and multiplayer |
| 1606 |
* |
| 1607 |
* 26 3/17/98 6:17p Jason |
| 1608 |
* added gamemode collide stuff |
| 1609 |
* |
| 1610 |
* 25 3/17/98 6:00p Jason |
| 1611 |
* changes for gamemode scripts |
| 1612 |
* |
| 1613 |
* 24 3/16/98 6:41p Jason |
| 1614 |
* added user definable messages to multiplayer |
| 1615 |
* |
| 1616 |
* 23 3/16/98 11:19a Jason |
| 1617 |
* got scripts working with multiplayer |
| 1618 |
* |
| 1619 |
* 22 2/26/98 4:18p Jason |
| 1620 |
* fixed player death problem for incoming players |
| 1621 |
* |
| 1622 |
* 21 2/18/98 1:52p Jason |
| 1623 |
* made velocity a 6 byte packet |
| 1624 |
* |
| 1625 |
* 20 2/17/98 3:46p Matt |
| 1626 |
* Revamped weapon system and got sounds for spray and fusion weapons |
| 1627 |
* working. Still need to implements getting continuous & cutoff sounds |
| 1628 |
* from player ship. |
| 1629 |
* |
| 1630 |
* 19 2/08/98 5:01p Samir |
| 1631 |
* New game sequencing changes. |
| 1632 |
* |
| 1633 |
* 18 2/05/98 2:59p Matt |
| 1634 |
* Got rid of MultiObjSetPos(). Now just using ObjSetPos() |
| 1635 |
* |
| 1636 |
* 17 2/05/98 11:47a Jason |
| 1637 |
* changes for new roomnum system |
| 1638 |
* |
| 1639 |
* 16 2/04/98 6:09p Matt |
| 1640 |
* Changed object room number to indicate a terrain cell via a flag. Got |
| 1641 |
* rid of the object flag which used to indicate terrain. |
| 1642 |
* |
| 1643 |
*/ |
| 1644 |
|
| 1645 |
#include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/ |
| 1646 |
#include "pserror.h"cxx . . $ `<file>/misc/pserror.h`/ |
| 1647 |
#include "player.h"cxx . . $ `<file>/Descent3/player.h`/ |
| 1648 |
#include "game.h"cxx . . $ `<file>/Descent3/game.h`/ |
| 1649 |
#include "multi.h"cxx . . $ `<file>/Descent3/multi.h`/ |
| 1650 |
#include "multi_client.h"cxx . . $ `<file>/Descent3/multi_client.h`/ |
| 1651 |
#include "multi_server.h"cxx . . $ `<file>/Descent3/multi_server.h`/ |
| 1652 |
#include "ddio.h"cxx . . $ `<file>/ddio/ddio.h`/ |
| 1653 |
#include "hud.h"cxx . . $ `<file>/Descent3/hud.h`/ |
| 1654 |
#include "robotfire.h"cxx . . $ `<file>/Descent3/robotfire.h`/ |
| 1655 |
#include "ship.h"cxx . . $ `<file>/Descent3/ship.h`/ |
| 1656 |
#include "descent.h"cxx . . $ `<file>/Descent3/descent.h`/ |
| 1657 |
#include "damage.h"cxx . . $ `<file>/Descent3/damage.h`/ |
| 1658 |
#include "gamesequence.h"cxx . . $ `<file>/Descent3/gamesequence.h`/ |
| 1659 |
#include "objinfo.h"cxx . . $ `<file>/Descent3/objinfo.h`/ |
| 1660 |
#include "gametexture.h"cxx . . $ `<file>/Descent3/gametexture.h`/ |
| 1661 |
#include "room.h"cxx . . $ `<file>/Descent3/room.h`/ |
| 1662 |
#include "game2dll.h"cxx . . $ `<file>/lib/game2dll.h`/ |
| 1663 |
#include "viseffect.h"cxx . . $ `<file>/Descent3/viseffect.h`/ |
| 1664 |
#include "hlsoundlib.h"cxx . . $ `<file>/sndlib/hlsoundlib.h`/ |
| 1665 |
#include "soundload.h"cxx . . $ `<file>/sndlib/soundload.h`/ |
| 1666 |
#include "fireball.h"cxx . . $ `<file>/Descent3/fireball.h`/ |
| 1667 |
#include "Mission.h"cxx . . $ `<file>/Descent3/Mission.h`/ |
| 1668 |
#include "LoadLevel.h"cxx . . $ `<file>/Descent3/LoadLevel.h`/ |
| 1669 |
#include "gamecinematics.h"cxx . . $ `<file>/Descent3/gamecinematics.h`/ |
| 1670 |
#include "init.h"cxx . . $ `<file>/Descent3/init.h`/ |
| 1671 |
|
| 1672 |
#include "sounds.h"cxx . . $ `<file>/Descent3/sounds.h`/ |
| 1673 |
#include "weapon.h"cxx . . $ `<file>/Descent3/weapon.h`/ |
| 1674 |
#include "stringtable.h"cxx . . $ `<file>/Descent3/stringtable.h`/ |
| 1675 |
|
| 1676 |
#include "dedicated_server.h"cxx . . $ `<file>/lib/dedicated_server.h`/ |
| 1677 |
#include "demofile.h"cxx . . $ `<file>/lib/demofile.h`/ |
| 1678 |
#include "args.h"cxx . . $ `<file>/Descent3/args.h`/ |
| 1679 |
|
| 1680 |
#include "ui.h"cxx . . $ `<file>/ui/ui.h`/ |
| 1681 |
#include "newui.h"cxx . . $ `<file>/Descent3/newui.h`/ |
| 1682 |
#include "multi_dll_mgr.h"cxx . . $ `<file>/Descent3/multi_dll_mgr.h`/ |
| 1683 |
#include "BOA.h"cxx . . $ `<file>/Descent3/BOA.h`/ |
| 1684 |
#include "attach.h"cxx . . $ `<file>/Descent3/attach.h`/ |
| 1685 |
#include "mission_download.h"cxx . . $ `<file>/Descent3/mission_download.h`/ |
| 1686 |
// #include "gamespy.h" |
| 1687 |
#include "multi_world_state.h"cxx . . $ `<file>/Descent3/multi_world_state.h`/ |
| 1688 |
#include "ObjScript.h"cxx . . $ `<file>/Descent3/ObjScript.h`/ |
| 1689 |
#include "audiotaunts.h"cxx . . $ `<file>/Descent3/audiotaunts.h`/ |
| 1690 |
#include "marker.h"cxx . . $ `<file>/Descent3/marker.h`/ |
| 1691 |
#include "weather.h"cxx . . $ `<file>/Descent3/weather.h`/ |
| 1692 |
#include "doorway.h"cxx . . $ `<file>/Descent3/doorway.h`/ |
| 1693 |
#include "object_lighting.h"cxx . . $ `<file>/Descent3/object_lighting.h`/ |
| 1694 |
#include "spew.h"cxx . . $ `<file>/Descent3/spew.h`/ |
| 1695 |
#include "physics.h"cxx . . $ `<file>/physics/physics.h`/ |
| 1696 |
#include "SmallViews.h"cxx . . $ `<file>/Descent3/SmallViews.h`/ |
| 1697 |
#include "demofile.h"cxx . . $ `<file>/lib/demofile.h`/ |
| 1698 |
#include "debuggraph.h"cxx . . $ `<file>/Descent3/debuggraph.h`/ |
| 1699 |
#include "levelgoal.h"cxx . . $ `<file>/Descent3/levelgoal.h`/ |
| 1700 |
#include "osiris_share.h"cxx . . $ `<file>/Descent3/osiris_share.h`/ |
| 1701 |
#include "cockpit.h"cxx . . $ `<file>/Descent3/cockpit.h`/ |
| 1702 |
#include "hud.h"cxx . . $ `<file>/Descent3/hud.h`/ |
| 1703 |
|
| 1704 |
#include <string.h> |
| 1705 |
#include <memory.h> |
| 1706 |
#include <stdlib.h> |
| 1707 |
|
| 1708 |
#include "psrand.h"cxx . . $ `<file>/misc/psrand.h`/ |
| 1709 |
|
| 1710 |
#include "../md5/md5.h"cxx . . $ `<file>/md5/md5.h`/ |
| 1711 |
void MultiProcessShipChecksumcxx . . $ MultiProcessShipChecksum(54a9d97b34104f61).(MD5cxx . . $ MD5# *md5, int ship_index); |
| 1712 |
|
| 1713 |
|
| 1714 |
#include <algorithm> |
| 1715 |
|
| 1716 |
player_pos_suppresscxx . . $ player_pos_suppress# Player_pos_fixcxx . . $ Player_pos_fix.[MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!]; |
| 1717 |
|
| 1718 |
// Define this if you want to have secondaries be sent as reliable packets |
| 1719 |
//(not recommended - talk to Jason) |
| 1720 |
// #define RELIABLE_SECONDARIES |
| 1721 |
|
| 1722 |
// If this is true, PXO games won't save the kills, deaths, etc. |
| 1723 |
bool Multi_no_stats_savedcxx . . $ Multi_no_stats_saved. = false; |
| 1724 |
|
| 1725 |
uint32_tcxx . . $ uint32_t# Netgame_curr_handlecxx . . $ Netgame_curr_handle. = 1; |
| 1726 |
|
| 1727 |
uint16_tcxx . . $ uint16_t# Local_object_listcxx . . $ Local_object_list.[MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!]; |
| 1728 |
uint16_tcxx . . $ uint16_t# Server_object_listcxx . . $ Server_object_list.[MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!]; |
| 1729 |
uint16_tcxx . . $ uint16_t# Server_spew_listcxx . . $ Server_spew_list.[MAX_SPEW_EFFECTScxx . . $ `Descent3/spew.h:131:9`!]; |
| 1730 |
|
| 1731 |
#ifndef RELEASE |
| 1732 |
int Multi_packet_trackingcxx . . $ Multi_packet_tracking.[255]; |
| 1733 |
#endif |
| 1734 |
|
| 1735 |
// This is for clearing lightmapped objects on the client/server |
| 1736 |
int Num_client_lm_objectscxx . . $ Num_client_lm_objects., Num_server_lm_objectscxx . . $ Num_server_lm_objects.; |
| 1737 |
uint16_tcxx . . $ uint16_t# Client_lightmap_listcxx . . $ Client_lightmap_list.[MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!], Server_lightmap_listcxx . . $ Server_lightmap_list.[MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!]; |
| 1738 |
|
| 1739 |
// This is for breakable glass |
| 1740 |
uint16_tcxx . . $ uint16_t# Broke_glass_roomscxx . . $ Broke_glass_rooms.[MAX_BROKE_GLASScxx . . $ `Descent3/multi.h:750:9`!], Broke_glass_facescxx . . $ Broke_glass_faces.[MAX_BROKE_GLASScxx . . $ `Descent3/multi.h:750:9`!]; |
| 1741 |
int Num_broke_glasscxx . . $ Num_broke_glass. = 0; |
| 1742 |
|
| 1743 |
// This is for getting out a menu if in multiplayer |
| 1744 |
bool Multi_bail_ui_menucxx . . $ Multi_bail_ui_menu. = false; |
| 1745 |
|
| 1746 |
uint32_tcxx . . $ uint32_t# Multi_generic_match_tablecxx . . $ Multi_generic_match_table.[MAX_OBJECT_IDScxx . . $ `Descent3/objinfo.h:327:9`!]; |
| 1747 |
uint32_tcxx . . $ uint32_t# Multi_weapon_match_tablecxx . . $ Multi_weapon_match_table.[MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!]; |
| 1748 |
uint8_tcxx . . $ uint8_t# Multi_receive_buffercxx . . $ Multi_receive_buffer.[MAX_RECEIVE_SIZEcxx . . $ `Descent3/multi.h:677:9`!]; |
| 1749 |
|
| 1750 |
uint8_tcxx . . $ uint8_t# Multi_send_buffercxx . . $ Multi_send_buffer.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!][MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 1751 |
int Multi_send_sizecxx . . $ Multi_send_size.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1752 |
|
| 1753 |
player_fire_packetcxx . . $ player_fire_packet# Player_fire_packetcxx . . $ Player_fire_packet.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1754 |
float Multi_last_sent_timecxx . . $ Multi_last_sent_time.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!][MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1755 |
|
| 1756 |
uint8_tcxx . . $ uint8_t# Multi_reliable_send_buffercxx . . $ Multi_reliable_send_buffer.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!][MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 1757 |
int Multi_reliable_send_sizecxx . . $ Multi_reliable_send_size.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1758 |
float Multi_reliable_last_send_timecxx . . $ Multi_reliable_last_send_time.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1759 |
uint8_tcxx . . $ uint8_t# Multi_reliable_sent_positioncxx . . $ Multi_reliable_sent_position.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1760 |
uint8_tcxx . . $ uint8_t# Multi_reliable_urgentcxx . . $ Multi_reliable_urgent.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1761 |
|
| 1762 |
// For keeping track of buildings that have changed |
| 1763 |
uint8_tcxx . . $ uint8_t# Multi_building_statescxx . . $ Multi_building_states.[MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!]; |
| 1764 |
uint16_tcxx . . $ uint16_t# Multi_num_buildings_changedcxx . . $ Multi_num_buildings_changed. = 0; |
| 1765 |
|
| 1766 |
// For keeping track of powerup respawn points |
| 1767 |
powerup_respawncxx . . $ powerup_respawn# Powerup_respawncxx . . $ Powerup_respawn.[MAX_RESPAWNScxx . . $ `Descent3/multi.h:714:9`!]; |
| 1768 |
powerup_timercxx . . $ powerup_timer# Powerup_timercxx . . $ Powerup_timer.[MAX_RESPAWNScxx . . $ `Descent3/multi.h:714:9`!]; |
| 1769 |
|
| 1770 |
// For keeping track of damage and shields |
| 1771 |
int Multi_additional_damage_typecxx . . $ Multi_additional_damage_type.[MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!]; |
| 1772 |
float Multi_additional_damagecxx . . $ Multi_additional_damage.[MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!]; |
| 1773 |
int Multi_requested_damage_typecxx . . $ Multi_requested_damage_type. = PD_NONEcxx . . $ `Descent3/damage_external.h:23:9`!; |
| 1774 |
float Multi_requested_damage_amountcxx . . $ Multi_requested_damage_amount. = 0; |
| 1775 |
float Multi_additional_shieldscxx . . $ Multi_additional_shields.[MAX_SHIELD_REQUEST_TYPEScxx . . $ `Descent3/multi.h:651:9`!]; |
| 1776 |
|
| 1777 |
int Num_powerup_respawncxx . . $ Num_powerup_respawn. = 0; |
| 1778 |
int Num_powerup_timercxx . . $ Num_powerup_timer. = 0; |
| 1779 |
|
| 1780 |
// For level sequencing |
| 1781 |
int Multi_next_levelcxx . . $ Multi_next_level. = -1; |
| 1782 |
|
| 1783 |
netplayercxx . . $ netplayer# NetPlayerscxx . . $ NetPlayers.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1784 |
netgame_infocxx . . $ netgame_info# Netgamecxx . . $ Netgame.; |
| 1785 |
|
| 1786 |
int Num_network_games_knowncxx . . $ Num_network_games_known. = 0; |
| 1787 |
network_gamecxx . . $ network_game# Network_gamescxx . . $ Network_games.[MAX_NETWORK_GAMEScxx . . $ `Descent3/multi.h:678:9`!]; |
| 1788 |
|
| 1789 |
int Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game. = 0; |
| 1790 |
|
| 1791 |
char Tracker_idcxx . . $ Tracker_id.[TRACKER_ID_LENcxx . . $ `Descent3/multi.h:795:9`!]; |
| 1792 |
|
| 1793 |
vmt_descent3_structcxx . . $ vmt_descent3_struct# MTPilotinfocxx . . $ MTPilotinfo.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1794 |
|
| 1795 |
int16_t Multi_killscxx . . $ Multi_kills.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1796 |
int16_t Multi_deathscxx . . $ Multi_deaths.[MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!]; |
| 1797 |
|
| 1798 |
int Got_new_game_timecxx . . $ Got_new_game_time. = 0; |
| 1799 |
|
| 1800 |
#define MAX_COOP_TURRETScxx . . $ `Descent3/multi.cpp:1800:9`! 400 |
| 1801 |
float turret_holdercxx . . $ turret_holder.[MAX_COOP_TURRETScxx . . $ `Descent3/multi.cpp:1800:9`!]; |
| 1802 |
|
| 1803 |
#define DATA_CHUNK_SIZEcxx . . $ `Descent3/multi.cpp:1803:9`! 450 |
| 1804 |
|
| 1805 |
int Bandwidth_throttlecxx . . $ Bandwidth_throttle. = 0; |
| 1806 |
|
| 1807 |
int Use_file_xfercxx . . $ Use_file_xfer. = 1; |
| 1808 |
|
| 1809 |
int Reliable_countcxx . . $ Reliable_count. = 0; |
| 1810 |
int Last_reliable_countcxx . . $ Last_reliable_count. = 0; |
| 1811 |
|
| 1812 |
float Time_last_taunt_requestcxx . . $ Time_last_taunt_request. = 0.0f; |
| 1813 |
|
| 1814 |
// Display logos or not? |
| 1815 |
bool Multi_logo_statecxx . . $ Multi_logo_state. = true; |
| 1816 |
|
| 1817 |
bool Multi_Expect_demo_object_flagscxx . . $ Multi_Expect_demo_object_flags. = false; |
| 1818 |
|
| 1819 |
// Heartbeat flag |
| 1820 |
bool Got_heartbeatcxx . . $ Got_heartbeat. = false; |
| 1821 |
|
| 1822 |
// Message of the day |
| 1823 |
char Multi_message_of_the_daycxx . . $ Multi_message_of_the_day.[HUD_MESSAGE_LENGTHcxx . . $ `Descent3/hud.h:259:9`! * 2] = {0}; |
| 1824 |
|
| 1825 |
// Local function prototypes |
| 1826 |
void SendDataChunkcxx . . $ SendDataChunk(d4f767463ce0a6b3).(int playernum); |
| 1827 |
void DenyFilecxx . . $ DenyFile(b1146eedae1e1d0b).(int playernum, int filenum, int file_who); |
| 1828 |
void MultiDoFileCancelledcxx . . $ MultiDoFileCancelled(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data); |
| 1829 |
void MultiDoCustomPlayerDatacxx . . $ MultiDoCustomPlayerData(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data); |
| 1830 |
char *GetFileNameFromPlayerAndIDcxx . . $ GetFileNameFromPlayerAndID(744de07444492bc8).(int16_t playernum, int16_t id); |
| 1831 |
|
| 1832 |
// Multiplayer position flags |
| 1833 |
#define MPF_AFTERBURNERcxx . . $ `Descent3/multi.cpp:1833:9`! 1 // Afterburner is on |
| 1834 |
#define MPF_OUTSIDEcxx . . $ `Descent3/multi.cpp:1834:9`! 2 // Player is outside |
| 1835 |
#define MPF_DEADcxx . . $ `Descent3/multi.cpp:1835:9`! 4 // Player is dead |
| 1836 |
#define MPF_FIREDcxx . . $ `Descent3/multi.cpp:1836:9`! 8 // Player fired |
| 1837 |
#define MPF_SPRAYcxx . . $ `Descent3/multi.cpp:1837:9`! 16 // Player is using a spray weapon |
| 1838 |
#define MPF_ON_OFFcxx . . $ `Descent3/multi.cpp:1838:9`! 32 // Player is using an on/off weapon |
| 1839 |
#define MPF_HEADLIGHTcxx . . $ `Descent3/multi.cpp:1839:9`! 64 // Headlight is on for this player |
| 1840 |
#define MPF_THRUSTEDcxx . . $ `Descent3/multi.cpp:1840:9`! 128 // Player thrusted this frame |
| 1841 |
|
| 1842 |
#define MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(x, m) \ |
| 1843 |
{ \ |
| 1844 |
if ((x) == 0) { \ |
| 1845 |
BailOnMultiplayer((m)); \ |
| 1846 |
return; \ |
| 1847 |
} \ |
| 1848 |
} |
| 1849 |
#define MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(x) \ |
| 1850 |
{ \ |
| 1851 |
if ((x) == 0) { \ |
| 1852 |
BailOnMultiplayer(NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); \ |
| 1853 |
return; \ |
| 1854 |
} \ |
| 1855 |
} |
| 1856 |
|
| 1857 |
// Gets us out of a multiplayer game in a hurry...useful for when things are screwed |
| 1858 |
void BailOnMultiplayercxx . . $ BailOnMultiplayer(85c52e162fed56f9).(const char *message) { |
| 1859 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 1860 |
|
| 1861 |
// Show message |
| 1862 |
if (message == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) |
| 1863 |
ShowProgressScreencxx . . $ ShowProgressScreen(8d00172ec7558ddf).(TXT_MULTI_DATACORRUPTcxx . . $ `Descent3/stringtable.h:607:9`!); |
| 1864 |
else |
| 1865 |
ShowProgressScreencxx . . $ ShowProgressScreen(8d00172ec7558ddf).(message); |
| 1866 |
|
| 1867 |
MultiLeaveGamecxx . . $ MultiLeaveGame(49f6e7a06ebc5aa8).(); |
| 1868 |
Sleepcxx . . $ Sleep(d4f767463ce0a6b3).(2000); |
| 1869 |
} |
| 1870 |
|
| 1871 |
// Adds the trunctuated position data to an outgoing packet |
| 1872 |
void MultiAddPositionDatacxx . . $ MultiAddPositionData(960cd16f6e188b41).(vectorcxx . . $ vector# *pos, uint8_tcxx . . $ uint8_t# *data, int *count) { |
| 1873 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).((pos->xcxx . . $ vector#x. * 16.0), data, count); |
| 1874 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).((pos->zcxx . . $ vector#z. * 16.0), data, count); |
| 1875 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(pos->ycxx . . $ vector#y., data, count); |
| 1876 |
} |
| 1877 |
void MultiExtractPositionDatacxx . . $ MultiExtractPositionData(960cd16f6e188b41).(vectorcxx . . $ vector# *vec, uint8_tcxx . . $ uint8_t# *data, int *count) { |
| 1878 |
vec->xcxx . . $ vector#x. = ((float)MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, count)) / 16.0; |
| 1879 |
vec->zcxx . . $ vector#z. = ((float)MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, count)) / 16.0; |
| 1880 |
vec->ycxx . . $ vector#y. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, count); |
| 1881 |
} |
| 1882 |
|
| 1883 |
void MultiSendBadChecksumcxx . . $ MultiSendBadChecksum(d4f767463ce0a6b3).(int slot) { |
| 1884 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 1885 |
int size; |
| 1886 |
int count = 0; |
| 1887 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REJECTED_CHECKSUMcxx . . $ `Descent3/multi.h:648:9`!, data, &count); |
| 1888 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 1889 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[slot].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 1890 |
} |
| 1891 |
|
| 1892 |
// Puts player "slot" position info into the passed in buffer |
| 1893 |
// Returns the number of bytes used |
| 1894 |
int MultiStuffPositioncxx . . $ MultiStuffPosition(b2cc8657ba51080d).(int slot, uint8_tcxx . . $ uint8_t# *data) { |
| 1895 |
int size; |
| 1896 |
int count = 0; |
| 1897 |
uint8_tcxx . . $ uint8_t# flags = 0; |
| 1898 |
|
| 1899 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.]; |
| 1900 |
|
| 1901 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYER_POScxx . . $ `Descent3/multi.h:527:9`!, data, &count); |
| 1902 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 1903 |
|
| 1904 |
if (slot == Player_numcxx . . $ Player_num.) { |
| 1905 |
// tell the reciever to expect fire information, only if |
| 1906 |
// we fired this frame and it isn't going to be a seperate packet |
| 1907 |
// (like secondaries in a non-peer to peer, are sent reliably) |
| 1908 |
if (Player_fire_packetcxx . . $ Player_fire_packet.[slot].fired_on_this_framecxx . . $ player_fire_packet#fired_on_this_frame. == PFP_FIREDcxx . . $ `Descent3/multi.h:660:9`!) |
| 1909 |
flags |= MPF_FIREDcxx . . $ `Descent3/multi.cpp:1836:9`!; |
| 1910 |
} |
| 1911 |
|
| 1912 |
// Send timestamp |
| 1913 |
if (slot == Player_numcxx . . $ Player_num.) |
| 1914 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(Gametimecxx . . $ Gametime., data, &count); |
| 1915 |
else |
| 1916 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(NetPlayerscxx . . $ NetPlayers.[slot].packet_timecxx . . $ netplayer#packet_time., data, &count); |
| 1917 |
|
| 1918 |
// Do position |
| 1919 |
MultiAddPositionDatacxx . . $ MultiAddPositionData(960cd16f6e188b41).(&obj->poscxx . . $ object#pos., data, &count); |
| 1920 |
|
| 1921 |
// Do orientation |
| 1922 |
angveccxx . . $ angvec# angs; |
| 1923 |
vm_ExtractAnglesFromMatrixcxx . . $ vm_ExtractAnglesFromMatrix(5f9a6d6f613ae256).(&angs, &obj->orientcxx . . $ object#orient.); |
| 1924 |
|
| 1925 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.pcxx . . $ angvec#p., data, &count); |
| 1926 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.hcxx . . $ angvec#h., data, &count); |
| 1927 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.bcxx . . $ angvec#b., data, &count); |
| 1928 |
|
| 1929 |
// Do roomnumber and terrain flag |
| 1930 |
|
| 1931 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(obj->roomnum), data, &count); |
| 1932 |
|
| 1933 |
// Fill flags |
| 1934 |
if (OBJECT_OUTSIDEcxx . . $ `lib/object_external_struct.h:130:9`!(obj)) |
| 1935 |
flags |= MPF_OUTSIDEcxx . . $ `Descent3/multi.cpp:1834:9`!; |
| 1936 |
if (Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & PLAYER_FLAGS_AFTERBURN_ONcxx . . $ `Descent3/player_external.h:92:9`!) |
| 1937 |
flags |= MPF_AFTERBURNERcxx . . $ `Descent3/multi.cpp:1833:9`!; |
| 1938 |
if (Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!) |
| 1939 |
flags |= MPF_THRUSTEDcxx . . $ `Descent3/multi.cpp:1840:9`!; |
| 1940 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. & WFF_SPRAYcxx . . $ `Descent3/player_external.h:103:9`!) |
| 1941 |
flags |= MPF_SPRAYcxx . . $ `Descent3/multi.cpp:1837:9`!; |
| 1942 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. & WFF_ON_OFFcxx . . $ `Descent3/player_external.h:104:9`!) |
| 1943 |
flags |= MPF_ON_OFFcxx . . $ `Descent3/multi.cpp:1838:9`!; |
| 1944 |
if (Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!) // || Players[slot].flags & PLAYER_FLAGS_DYING) |
| 1945 |
flags |= MPF_DEADcxx . . $ `Descent3/multi.cpp:1835:9`!; |
| 1946 |
if (Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & PLAYER_FLAGS_HEADLIGHTcxx . . $ `Descent3/player_external.h:90:9`!) |
| 1947 |
flags |= MPF_HEADLIGHTcxx . . $ `Descent3/multi.cpp:1839:9`!; |
| 1948 |
|
| 1949 |
// Do velocity |
| 1950 |
vectorcxx . . $ vector# *vel = &obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity.; |
| 1951 |
vectorcxx . . $ vector# *rotvel = &obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel.; |
| 1952 |
|
| 1953 |
// mprintf(0,"Outvel x=%f y=%f z=%f\n",vel->x,vel->y,vel->z); |
| 1954 |
|
| 1955 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).((vel->xcxx . . $ vector#x. * 128.0), data, &count); |
| 1956 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).((vel->ycxx . . $ vector#y. * 128.0), data, &count); |
| 1957 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).((vel->zcxx . . $ vector#z. * 128.0), data, &count); |
| 1958 |
|
| 1959 |
if (Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_SENDROTVELcxx . . $ `Descent3/multi_external.h:231:9`!) { |
| 1960 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(rotvel->xcxx . . $ vector#x. / 4, data, &count); |
| 1961 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(rotvel->ycxx . . $ vector#y. / 4, data, &count); |
| 1962 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(rotvel->zcxx . . $ vector#z. / 4, data, &count); |
| 1963 |
|
| 1964 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..turnrollcxx . . $ physics_info#turnroll., data, &count); |
| 1965 |
} |
| 1966 |
|
| 1967 |
int weapon_indices = ((Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!].indexcxx . . $ player_weapon#index. - 10) << 4) | Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!].indexcxx . . $ player_weapon#index.; |
| 1968 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(weapon_indices, data, &count); |
| 1969 |
|
| 1970 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(Playerscxx . . $ Players.[slot].energycxx . . $ player#energy., data, &count); |
| 1971 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(flags, data, &count); |
| 1972 |
|
| 1973 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 1974 |
|
| 1975 |
return count; |
| 1976 |
} |
| 1977 |
|
| 1978 |
void DoNextPlayerFilecxx . . $ DoNextPlayerFile(d4f767463ce0a6b3).(int playernum) { |
| 1979 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!; |
| 1980 |
NetPlayerscxx . . $ NetPlayers.[playernum].custom_file_seqcxx . . $ netplayer#custom_file_seq.++; |
| 1981 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].custom_file_seqcxx . . $ netplayer#custom_file_seq. > NETFILE_ID_LAST_FILEcxx . . $ `Descent3/multi.h:697:9`!) { |
| 1982 |
NetPlayerscxx . . $ NetPlayers.[playernum].custom_file_seqcxx . . $ netplayer#custom_file_seq. = NETFILE_ID_DONEcxx . . $ `Descent3/multi.h:694:9`!; |
| 1983 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Setting %s's custom ship logo to %s\n", Players[playernum].callsign, NetPlayers[playernum].ship_logo); |
| 1984 |
PlayerSetCustomTexturecxx . . $ PlayerSetCustomTexture(3c8082c546dd2ea0).(playernum, NetPlayerscxx . . $ NetPlayers.[playernum].ship_logocxx . . $ netplayer#ship_logo.); |
| 1985 |
// If we are the server, we need to tell everyone about this guy's custom data |
| 1986 |
if ((Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) && (Use_file_xfercxx . . $ Use_file_xfer.)) { |
| 1987 |
for (int i = 0; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 1988 |
// Send custom ship info if we have it |
| 1989 |
if ((NetPlayerscxx . . $ NetPlayers.[i].custom_file_seqcxx . . $ netplayer#custom_file_seq. == NETFILE_ID_DONEcxx . . $ `Descent3/multi.h:694:9`!) || (i == Player_numcxx . . $ Player_num.)) { |
| 1990 |
MultiSendClientCustomDatacxx . . $ MultiSendClientCustomData(3e454b8ccf442868).(i, playernum); |
| 1991 |
} |
| 1992 |
} |
| 1993 |
MultiSendClientCustomDatacxx . . $ MultiSendClientCustomData(3e454b8ccf442868).(playernum); |
| 1994 |
} |
| 1995 |
} |
| 1996 |
} |
| 1997 |
|
| 1998 |
// Puts player "slot" position info into the passed in buffer |
| 1999 |
// Returns the number of bytes used |
| 2000 |
int MultiStuffRobotPositioncxx . . $ MultiStuffRobotPosition(9bed83f5e0cbe331).(uint16_tcxx . . $ uint16_t# objectnum, uint8_tcxx . . $ uint8_t# *data) { |
| 2001 |
int size; |
| 2002 |
int count = 0; |
| 2003 |
//@@multi_orientation mat; |
| 2004 |
|
| 2005 |
// mprintf(0,"!");//KBTEST |
| 2006 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[objectnum]; |
| 2007 |
|
| 2008 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(obj->flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 2009 |
|
| 2010 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ROBOT_POScxx . . $ `Descent3/multi.h:567:9`!, data, &count); |
| 2011 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(objectnum, data, &count); |
| 2012 |
|
| 2013 |
// Do position |
| 2014 |
MultiAddPositionDatacxx . . $ MultiAddPositionData(960cd16f6e188b41).(&obj->poscxx . . $ object#pos., data, &count); |
| 2015 |
|
| 2016 |
// Do orientation |
| 2017 |
|
| 2018 |
// Do orientation |
| 2019 |
angveccxx . . $ angvec# angs; |
| 2020 |
vm_ExtractAnglesFromMatrixcxx . . $ vm_ExtractAnglesFromMatrix(5f9a6d6f613ae256).(&angs, &obj->orientcxx . . $ object#orient.); |
| 2021 |
|
| 2022 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.pcxx . . $ angvec#p., data, &count); |
| 2023 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.hcxx . . $ angvec#h., data, &count); |
| 2024 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.bcxx . . $ angvec#b., data, &count); |
| 2025 |
|
| 2026 |
// Do roomnumber and terrain flag |
| 2027 |
|
| 2028 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(obj->roomnum), data, &count); |
| 2029 |
|
| 2030 |
if (OBJECT_OUTSIDEcxx . . $ `lib/object_external_struct.h:130:9`!(obj)) |
| 2031 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(1, data, &count); |
| 2032 |
else |
| 2033 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(0, data, &count); |
| 2034 |
|
| 2035 |
vectorcxx . . $ vector# *vel = &obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity.; |
| 2036 |
vectorcxx . . $ vector# *rotvel = &obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel.; |
| 2037 |
|
| 2038 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).((vel->xcxx . . $ vector#x. * 128.0), data, &count); |
| 2039 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).((vel->ycxx . . $ vector#y. * 128.0), data, &count); |
| 2040 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).((vel->zcxx . . $ vector#z. * 128.0), data, &count); |
| 2041 |
|
| 2042 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 2043 |
return count; |
| 2044 |
} |
| 2045 |
|
| 2046 |
// Puts player "slot" position info into the passed in buffer |
| 2047 |
// Returns the number of bytes used |
| 2048 |
int MultiSendRobotFireWeaponcxx . . $ MultiSendRobotFireWeapon(31923516c07f001d).(uint16_tcxx . . $ uint16_t# objectnum, vectorcxx . . $ vector# *pos, vectorcxx . . $ vector# *dir, uint16_tcxx . . $ uint16_t# weaponnum) { |
| 2049 |
int size; |
| 2050 |
int count = 0; |
| 2051 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 2052 |
// mprintf(0,"Sending Robot %d fired.\n",objectnum); |
| 2053 |
// Check to make sure we're the server |
| 2054 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 2055 |
BailOnMultiplayercxx . . $ BailOnMultiplayer(85c52e162fed56f9).(NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 2056 |
return 0; |
| 2057 |
} |
| 2058 |
|
| 2059 |
// mprintf(0,"@");//KBTEST |
| 2060 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[objectnum]; |
| 2061 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(obj->flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 2062 |
|
| 2063 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ROBOT_FIREcxx . . $ `Descent3/multi.h:568:9`!, data, &count); |
| 2064 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(objectnum, data, &count); |
| 2065 |
|
| 2066 |
// Do position |
| 2067 |
// memcpy (&data[count],pos,sizeof(vector)); |
| 2068 |
// count+=sizeof(vector); |
| 2069 |
MultiAddVectorcxx . . $ MultiAddVector(f5e3e9791ffe6d9f).(*pos, data, &count); |
| 2070 |
|
| 2071 |
// Do orientation |
| 2072 |
// memcpy (&data[count],dir,sizeof(vector)); |
| 2073 |
// count+=sizeof(vector); |
| 2074 |
MultiAddVectorcxx . . $ MultiAddVector(f5e3e9791ffe6d9f).(*dir, data, &count); |
| 2075 |
|
| 2076 |
uint32_tcxx . . $ uint32_t# index = MultiGetMatchChecksumcxx . . $ MultiGetMatchChecksum(58c590d1186ea715).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weaponnum); |
| 2077 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(index, data, &count); |
| 2078 |
|
| 2079 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 2080 |
// Add it to the outgoing queue. The MultiSendRobotFireSound() function will actually send it |
| 2081 |
for (int i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 2082 |
if (i == Player_numcxx . . $ Player_num.) |
| 2083 |
continue; |
| 2084 |
|
| 2085 |
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`!)) { |
| 2086 |
if (Multi_send_sizecxx . . $ Multi_send_size.[i] + count >= MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!) |
| 2087 |
MultiSendFullPacketcxx . . $ MultiSendFullPacket(3e454b8ccf442868).(i, 0); |
| 2088 |
|
| 2089 |
memcpy(&Multi_send_buffercxx . . $ Multi_send_buffer.[i][Multi_send_sizecxx . . $ Multi_send_size.[i]], data, count); |
| 2090 |
Multi_send_sizecxx . . $ Multi_send_size.[i] += count; |
| 2091 |
// Don't send because we are waiting for the robot fire sound to send |
| 2092 |
} |
| 2093 |
} |
| 2094 |
return count; |
| 2095 |
} |
| 2096 |
|
| 2097 |
void MultiDoRobotFirecxx . . $ MultiDoRobotFire(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2098 |
int count = 0; |
| 2099 |
uint16_tcxx . . $ uint16_t# obj_num; |
| 2100 |
vectorcxx . . $ vector# weapon_pos; |
| 2101 |
vectorcxx . . $ vector# weapon_dir; |
| 2102 |
uint32_tcxx . . $ uint32_t# weapon_num; |
| 2103 |
uint32_tcxx . . $ uint32_t# uniqueid; |
| 2104 |
|
| 2105 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 2106 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason, a server got the multi do fire packet |
| 2107 |
return; |
| 2108 |
} |
| 2109 |
|
| 2110 |
// mprintf(0,"*"); |
| 2111 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2112 |
int serv_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 2113 |
obj_num = Server_object_listcxx . . $ Server_object_list.[serv_objnum]; |
| 2114 |
|
| 2115 |
if (obj_num == 65535 || !(Objectscxx . . $ Objects.[obj_num].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!)) { |
| 2116 |
// Int3(); // Get Jason, invalid robot firing! |
| 2117 |
return; |
| 2118 |
} |
| 2119 |
|
| 2120 |
// memcpy (&weapon_pos,&data[count],sizeof(vector)); |
| 2121 |
// count+=sizeof(vector); |
| 2122 |
weapon_pos =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 2123 |
// memcpy (&weapon_dir,&data[count],sizeof(vector)); |
| 2124 |
// count+=sizeof(vector); |
| 2125 |
weapon_dir =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 2126 |
|
| 2127 |
weapon_num = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 2128 |
|
| 2129 |
if (Objectscxx . . $ Objects.[obj_num].typecxx . . $ object#type. == 255) |
| 2130 |
return; |
| 2131 |
uniqueid = MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(weapon_num); |
| 2132 |
|
| 2133 |
CreateAndFireWeaponcxx . . $ CreateAndFireWeapon(8720b471d3264b3b).(&weapon_pos, &weapon_dir, &Objectscxx . . $ Objects.[obj_num], uniqueid); |
| 2134 |
} |
| 2135 |
|
| 2136 |
// Does a cool vis effect to announce a player or powerup |
| 2137 |
void MultiAnnounceEffectcxx . . $ MultiAnnounceEffect(4359ca8c31d2d955).(objectcxx . . $ object# *obj, float size, float time) { |
| 2138 |
int visnum = VisEffectCreatecxx . . $ VisEffectCreate(20e4831b18f6895c).(VIS_FIREBALLcxx . . $ `Descent3/viseffect_external.h:61:9`!, BLAST_RING_INDEXcxx . . $ `Descent3/fireball_external.h:31:9`!, obj->roomnumcxx . . $ object#roomnum., &obj->poscxx . . $ object#pos.); |
| 2139 |
if (visnum >= 0) { |
| 2140 |
vectorcxx . . $ vector# norm = {0, 1, 0}; |
| 2141 |
vis_effectcxx . . $ vis_effect# *vis = &VisEffectscxx . . $ VisEffects.[visnum]; |
| 2142 |
vis->sizecxx . . $ vis_effect#size. = size; |
| 2143 |
vis->lifetimecxx . . $ vis_effect#lifetime. = time; |
| 2144 |
vis->lifeleftcxx . . $ vis_effect#lifeleft. = time; |
| 2145 |
vis->custom_handlecxx . . $ vis_effect#custom_handle. = Fireballscxx . . $ Fireballs.[BLUE_BLAST_RING_INDEXcxx . . $ `Descent3/fireball_external.h:44:9`!].bm_handlecxx . . $ fireball#bm_handle.; |
| 2146 |
vis->flagscxx . . $ vis_effect#flags. |= VF_PLANARcxx . . $ `Descent3/viseffect_external.h:67:9`! | VF_REVERSEcxx . . $ `Descent3/viseffect_external.h:68:9`!; |
| 2147 |
vis->end_poscxx . . $ vis_effect#end_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). norm; |
| 2148 |
} |
| 2149 |
} |
| 2150 |
|
| 2151 |
// MultiProcessIncoming reads incoming data off the unreliable and reliable ports and sends |
| 2152 |
// the data to process_big_data |
| 2153 |
void MultiProcessIncomingcxx . . $ MultiProcessIncoming(49f6e7a06ebc5aa8).() { |
| 2154 |
int size, i; |
| 2155 |
uint8_tcxx . . $ uint8_t# *data; |
| 2156 |
network_addresscxx . . $ network_address# from_addr; |
| 2157 |
|
| 2158 |
data = &(Multi_receive_buffercxx . . $ Multi_receive_buffer.[0]); |
| 2159 |
|
| 2160 |
// get the other net players data |
| 2161 |
while ((size = nw_Receivecxx . . $ nw_Receive(4faaf8d0141e84f4).(data, &from_addr)) > 0) { |
| 2162 |
MultiProcessBigDatacxx . . $ MultiProcessBigData(c3263a6d42f31e8c).(data, size, &from_addr); |
| 2163 |
if (ServerTimeoutcxx . . $ ServerTimeout.) { |
| 2164 |
LastPacketReceivedcxx . . $ LastPacketReceived. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 2165 |
} |
| 2166 |
} // end while |
| 2167 |
|
| 2168 |
// read reliable sockets for data |
| 2169 |
data = &(Multi_receive_buffercxx . . $ Multi_receive_buffer.[0]); |
| 2170 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 2171 |
for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 2172 |
if (Player_numcxx . . $ Player_num. == i) |
| 2173 |
continue; |
| 2174 |
|
| 2175 |
if ((NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) && (NetPlayerscxx . . $ NetPlayers.[i].reliable_socketcxx . . $ netplayer#reliable_socket. != INVALID_SOCKETcxx . . $ `lib/networking.h:221:9`!) && |
| 2176 |
(NetPlayerscxx . . $ NetPlayers.[i].reliable_socketcxx . . $ netplayer#reliable_socket. != 0)) { |
| 2177 |
|
| 2178 |
while ((size = nw_ReceiveReliablecxx . . $ nw_ReceiveReliable(ef9024b465536c23).(NetPlayerscxx . . $ NetPlayers.[i].reliable_socketcxx . . $ netplayer#reliable_socket., data, MAX_RECEIVE_SIZEcxx . . $ `Descent3/multi.h:677:9`!)) > 0) { |
| 2179 |
MultiProcessBigDatacxx . . $ MultiProcessBigData(c3263a6d42f31e8c).(data, size, &NetPlayerscxx . . $ NetPlayers.[i].addrcxx . . $ netplayer#addr.); |
| 2180 |
} |
| 2181 |
} |
| 2182 |
} |
| 2183 |
} else { |
| 2184 |
// if I'm not the master of the game, read reliable data from my connection with the server |
| 2185 |
if ((NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket. != INVALID_SOCKETcxx . . $ `lib/networking.h:221:9`!) && (NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket. != 0)) { |
| 2186 |
while ((size = nw_ReceiveReliablecxx . . $ nw_ReceiveReliable(ef9024b465536c23).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, MAX_RECEIVE_SIZEcxx . . $ `Descent3/multi.h:677:9`!)) > 0) { |
| 2187 |
MultiProcessBigDatacxx . . $ MultiProcessBigData(c3263a6d42f31e8c).(data, size, &Netgamecxx . . $ Netgame..server_addresscxx . . $ netgame_info#server_address.); |
| 2188 |
} |
| 2189 |
} |
| 2190 |
} |
| 2191 |
} |
| 2192 |
|
| 2193 |
// Starts a packet of data |
| 2194 |
int START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(int type, uint8_tcxx . . $ uint8_t# *data, int *count, uint8_tcxx . . $ uint8_t# reliable) { |
| 2195 |
int size_offset; |
| 2196 |
|
| 2197 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(type, data, count); |
| 2198 |
|
| 2199 |
// Do size |
| 2200 |
size_offset = *count; |
| 2201 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(0, data, count); |
| 2202 |
|
| 2203 |
/* |
| 2204 |
#ifndef RELEASE |
| 2205 |
|
| 2206 |
if (Netgame.local_role==LR_SERVER) |
| 2207 |
{ |
| 2208 |
MultiAddByte (reliable,data,count); |
| 2209 |
if (reliable) |
| 2210 |
{ |
| 2211 |
MultiAddInt (Reliable_count,data,count); |
| 2212 |
Reliable_count++; |
| 2213 |
} |
| 2214 |
} |
| 2215 |
else |
| 2216 |
MultiAddByte (0,data,count); |
| 2217 |
|
| 2218 |
#endif |
| 2219 |
*/ |
| 2220 |
return size_offset; |
| 2221 |
} |
| 2222 |
|
| 2223 |
// End a pakcet of data |
| 2224 |
void END_DATAcxx . . $ END_DATA(dde21517a502ab05).(int count, uint8_tcxx . . $ uint8_t# *data, int offset) { MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(count, data, &offset); } |
| 2225 |
|
| 2226 |
// Skips the header stuff at the beginning of a packet |
| 2227 |
void SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(uint8_tcxx . . $ uint8_t# *data, int *count) { |
| 2228 |
MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, count); |
| 2229 |
MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, count); |
| 2230 |
} |
| 2231 |
|
| 2232 |
// called once a frame on client and server. NOTE: only servers (game masters) check for |
| 2233 |
// listen connections. |
| 2234 |
void MultiDoFramecxx . . $ MultiDoFrame(49f6e7a06ebc5aa8).() { |
| 2235 |
if (!(Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!)) |
| 2236 |
return; |
| 2237 |
|
| 2238 |
ScoreAPIFrameIntervalcxx . . $ ScoreAPIFrameInterval(49f6e7a06ebc5aa8).(); |
| 2239 |
|
| 2240 |
static int debug_id = -2; |
| 2241 |
static float last_game_time = 99999999.9f; |
| 2242 |
|
| 2243 |
CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(EVT_GAME_INTERVALcxx . . $ `lib/d3events.h:119:9`!, &DLLInfocxx . . $ DLLInfo.); |
| 2244 |
|
| 2245 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 2246 |
MultiDoServerFramecxx . . $ MultiDoServerFrame(49f6e7a06ebc5aa8).(); |
| 2247 |
else { |
| 2248 |
if (debug_id == -2) { |
| 2249 |
debug_id = DebugGraph_Addcxx . . $ DebugGraph_Add(9bc3e79dc6ad0d07).(0.0f, 10000.0f, "Ping", DGF_MULTIPLAYERcxx . . $ `Descent3/debuggraph.h:39:9`!); |
| 2250 |
} |
| 2251 |
if (debug_id >= 0) { |
| 2252 |
if (last_game_time > Gametimecxx . . $ Gametime.) { |
| 2253 |
// reset last_game_time, we must have started a new level |
| 2254 |
last_game_time = Gametimecxx . . $ Gametime.; |
| 2255 |
} |
| 2256 |
|
| 2257 |
float next_time = last_game_time + 0.3f; // update every 1/3 second |
| 2258 |
if (Gametimecxx . . $ Gametime. >= next_time) { |
| 2259 |
last_game_time = Gametimecxx . . $ Gametime.; |
| 2260 |
if (NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) { |
| 2261 |
DebugGraph_Updatecxx . . $ DebugGraph_Update(43c79ee2f1b9aefe).(debug_id, NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].ping_timecxx . . $ netplayer#ping_time. * 1000.0f); |
| 2262 |
} |
| 2263 |
} |
| 2264 |
} |
| 2265 |
|
| 2266 |
MultiDoClientFramecxx . . $ MultiDoClientFrame(49f6e7a06ebc5aa8).(); |
| 2267 |
// Verify object list |
| 2268 |
} |
| 2269 |
} |
| 2270 |
|
| 2271 |
// Returns to the slot number of the player that the passed in address belongs to |
| 2272 |
int MultiMatchPlayerToAddresscxx . . $ MultiMatchPlayerToAddress(974bd2fc5f961852).(network_addresscxx . . $ network_address# *from_addr) { |
| 2273 |
int i; |
| 2274 |
for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 2275 |
if (NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) { |
| 2276 |
if (!(memcmp(from_addr, &NetPlayerscxx . . $ NetPlayers.[i].addrcxx . . $ netplayer#addr., sizeof(network_addresscxx . . $ network_address#)))) |
| 2277 |
return i; |
| 2278 |
} |
| 2279 |
} |
| 2280 |
// mprintf(0,"Got a packet from unconnected player?!\n"); |
| 2281 |
return -1; |
| 2282 |
} |
| 2283 |
|
| 2284 |
// Gets info about a player |
| 2285 |
// Server only |
| 2286 |
extern int Buddy_handlecxx . . $ Buddy_handle.[MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!]; |
| 2287 |
bool AINotifycxx . . $ AINotify(f32b5964aaa42c22).(objectcxx . . $ object# *obj, uint8_tcxx . . $ uint8_t# notify_type, void *info); |
| 2288 |
void MultiDoMyInfocxx . . $ MultiDoMyInfo(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2289 |
int count = 0; |
| 2290 |
char ship_name[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; |
| 2291 |
int length; |
| 2292 |
|
| 2293 |
// Skip header stuff |
| 2294 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2295 |
|
| 2296 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2297 |
if (!(NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!)) { |
| 2298 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(1, "ERROR! We got a MY_INFO packet from a disconnected player!\n"); |
| 2299 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 2300 |
return; |
| 2301 |
} |
| 2302 |
|
| 2303 |
// Copy the name out |
| 2304 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2305 |
if (len > CALLSIGN_LENcxx . . $ `Descent3/player_external_struct.h:89:9`!) |
| 2306 |
length = CALLSIGN_LENcxx . . $ `Descent3/player_external_struct.h:89:9`!; |
| 2307 |
else |
| 2308 |
length = len; |
| 2309 |
|
| 2310 |
memcpy(Playerscxx . . $ Players.[slot].callsigncxx . . $ player#callsign., &data[count], length); |
| 2311 |
count += len; |
| 2312 |
|
| 2313 |
// Copy the ship name out |
| 2314 |
len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2315 |
memcpy(ship_name, &data[count], len); |
| 2316 |
count += len; |
| 2317 |
|
| 2318 |
int ship_index = FindShipNamecxx . . $ FindShipName(5c4306d8553b3696).(ship_name); |
| 2319 |
if (ship_index < 0) |
| 2320 |
ship_index = 0; |
| 2321 |
|
| 2322 |
if (!PlayerIsShipAllowedcxx . . $ PlayerIsShipAllowed(ceb9eed3194142b2).(slot, ship_name)) { |
| 2323 |
bool found_one = false; |
| 2324 |
int i; |
| 2325 |
|
| 2326 |
// Loop through ships, looking for one that's allowed |
| 2327 |
for (i = 0; i < MAX_SHIPScxx . . $ `Descent3/ship.h:122:9`! && !found_one; i++) { |
| 2328 |
if (Shipscxx . . $ Ships.[i].usedcxx . . $ ship#used. && PlayerIsShipAllowedcxx . . $ PlayerIsShipAllowed(cf9ef193275fa6d8).(Player_numcxx . . $ Player_num., i)) { |
| 2329 |
Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].ship_indexcxx . . $ player#ship_index. = i; |
| 2330 |
MultiBashPlayerShipcxx . . $ MultiBashPlayerShip(577809987ad7a468).(slot, Shipscxx . . $ Ships.[i].namecxx . . $ ship#name.); |
| 2331 |
found_one = true; |
| 2332 |
} |
| 2333 |
} |
| 2334 |
|
| 2335 |
// We should have found one |
| 2336 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(found_one == true); |
| 2337 |
} |
| 2338 |
|
| 2339 |
PlayerChangeShipcxx . . $ PlayerChangeShip(3e454b8ccf442868).(slot, ship_index); |
| 2340 |
|
| 2341 |
Playerscxx . . $ Players.[slot].time_in_gamecxx . . $ player#time_in_game. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 2342 |
if (Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game.) { |
| 2343 |
uint32_tcxx . . $ uint32_t# mt_sig; |
| 2344 |
|
| 2345 |
Playerscxx . . $ Players.[slot].killscxx . . $ player#kills. = 0; |
| 2346 |
Playerscxx . . $ Players.[slot].deathscxx . . $ player#deaths. = 0; |
| 2347 |
Playerscxx . . $ Players.[slot].suicidescxx . . $ player#suicides. = 0; |
| 2348 |
Playerscxx . . $ Players.[slot].lateral_thrustcxx . . $ player#lateral_thrust. = 0; |
| 2349 |
Playerscxx . . $ Players.[slot].rotational_thrustcxx . . $ player#rotational_thrust. = 0; |
| 2350 |
|
| 2351 |
mt_sig = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 2352 |
|
| 2353 |
if (mt_sig != MASTER_TRACKER_SIGcxx . . $ `Descent3/multi.h:656:9`!) { |
| 2354 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. &= ~NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 2355 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid master tracker signature! Someone tried to join a master tracker game through the local net screen!\n"); |
| 2356 |
} |
| 2357 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. |= NPF_MT_READING_PILOTcxx . . $ `Descent3/multi_external.h:168:9`!; |
| 2358 |
len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2359 |
memcpy(Playerscxx . . $ Players.[slot].tracker_idcxx . . $ player#tracker_id., &data[count], len); |
| 2360 |
count += len; |
| 2361 |
strcpy(MTPilotinfocxx . . $ MTPilotinfo.[slot].tracker_idcxx . . $ vmt_descent3_struct#tracker_id., Playerscxx . . $ Players.[slot].tracker_idcxx . . $ player#tracker_id.); |
| 2362 |
strcpy(MTPilotinfocxx . . $ MTPilotinfo.[slot].pilot_namecxx . . $ vmt_descent3_struct#pilot_name., Playerscxx . . $ Players.[slot].callsigncxx . . $ player#callsign.); |
| 2363 |
} |
| 2364 |
|
| 2365 |
Multi_deathscxx . . $ Multi_deaths.[slot] = 0; |
| 2366 |
Multi_killscxx . . $ Multi_kills.[slot] = 0; |
| 2367 |
// Request pilot info from the mastertracker |
| 2368 |
int ser = 0; |
| 2369 |
ser = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2370 |
if (ser) { |
| 2371 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Serialized user joining game: %d\n", ser); |
| 2372 |
} |
| 2373 |
|
| 2374 |
// Get packets per second for this player |
| 2375 |
NetPlayerscxx . . $ NetPlayers.[slot].ppscxx . . $ netplayer#pps. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2376 |
|
| 2377 |
if (NetPlayerscxx . . $ NetPlayers.[slot].ppscxx . . $ netplayer#pps. < 2) |
| 2378 |
NetPlayerscxx . . $ NetPlayers.[slot].ppscxx . . $ netplayer#pps. = 2; |
| 2379 |
if (NetPlayerscxx . . $ NetPlayers.[slot].ppscxx . . $ netplayer#pps. > Netgamecxx . . $ Netgame..packets_per_secondcxx . . $ netgame_info#packets_per_second.) |
| 2380 |
NetPlayerscxx . . $ NetPlayers.[slot].ppscxx . . $ netplayer#pps. = Netgamecxx . . $ Netgame..packets_per_secondcxx . . $ netgame_info#packets_per_second.; |
| 2381 |
|
| 2382 |
// pilot picture id |
| 2383 |
NetPlayerscxx . . $ NetPlayers.[slot].pilot_pic_idcxx . . $ netplayer#pilot_pic_id. = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 2384 |
|
| 2385 |
// Copy the guidebot name out |
| 2386 |
char guidebot_name[32]; |
| 2387 |
memset(guidebot_name, 0, 32); |
| 2388 |
len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2389 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(len < 32); |
| 2390 |
memcpy(guidebot_name, &data[count], len); |
| 2391 |
count += len; |
| 2392 |
|
| 2393 |
// Set the guidebot name |
| 2394 |
if (Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_ALLOWGUIDEBOTcxx . . $ `Descent3/multi_external.h:232:9`!) { |
| 2395 |
gb_comcxx . . $ gb_com# command; |
| 2396 |
command.actioncxx . . $ gb_com#action. = COM_DO_ACTIONcxx . . $ `scripts/osiris_common.h:955:9`!; |
| 2397 |
command.indexcxx . . $ gb_com#index. = 44; // GBC_RENAME_SILENT |
| 2398 |
command.ptrcxx . . $ gb_com#ptr. = (void *)guidebot_name; |
| 2399 |
objectcxx . . $ object# *b_obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(Buddy_handlecxx . . $ Buddy_handle.[slot]); |
| 2400 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(b_obj); |
| 2401 |
AINotifycxx . . $ AINotify(f32b5964aaa42c22).(b_obj, AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!, (void *)&command); |
| 2402 |
} |
| 2403 |
|
| 2404 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_NEED_GAMETIMEcxx . . $ `Descent3/multi_external.h:151:9`!; |
| 2405 |
|
| 2406 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a myinfo packet from %s len=%d!\n", Players[slot].callsign, len); |
| 2407 |
} |
| 2408 |
|
| 2409 |
// Tell a client about the players connected |
| 2410 |
// Server only |
| 2411 |
void MultiDoRequestPlayerscxx . . $ MultiDoRequestPlayers(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2412 |
int count = 0; |
| 2413 |
|
| 2414 |
// Skip header stuff |
| 2415 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2416 |
|
| 2417 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2418 |
if (!(NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!)) { |
| 2419 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(1, "ERROR! We got a MY_INFO packet from a disconnected player!\n"); |
| 2420 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 2421 |
return; |
| 2422 |
} |
| 2423 |
|
| 2424 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_REQUEST_PLAYERScxx . . $ `Descent3/multi_external.h:153:9`!; |
| 2425 |
} |
| 2426 |
|
| 2427 |
// Tell a client about the buildings |
| 2428 |
// Server only |
| 2429 |
void MultiDoRequestBuildingscxx . . $ MultiDoRequestBuildings(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2430 |
int count = 0; |
| 2431 |
|
| 2432 |
// Skip header stuff |
| 2433 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2434 |
|
| 2435 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2436 |
if (!(NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!)) { |
| 2437 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(1, "ERROR! We got a request buildings packet from a disconnected player!\n"); |
| 2438 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 2439 |
return; |
| 2440 |
} |
| 2441 |
|
| 2442 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_REQUEST_BUILDINGScxx . . $ `Descent3/multi_external.h:155:9`!; |
| 2443 |
} |
| 2444 |
|
| 2445 |
// Tell a client about the objects |
| 2446 |
// Server only |
| 2447 |
void MultiDoRequestObjectscxx . . $ MultiDoRequestObjects(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2448 |
int count = 0; |
| 2449 |
|
| 2450 |
// Skip header stuff |
| 2451 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2452 |
|
| 2453 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2454 |
if (!(NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!)) { |
| 2455 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(1, "ERROR! We got a request object packet from a disconnected player!\n"); |
| 2456 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 2457 |
return; |
| 2458 |
} |
| 2459 |
|
| 2460 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_REQUEST_OBJECTScxx . . $ `Descent3/multi_external.h:157:9`!; |
| 2461 |
} |
| 2462 |
|
| 2463 |
// Tell a client about the objects |
| 2464 |
// Server only |
| 2465 |
void MultiDoRequestWorldStatescxx . . $ MultiDoRequestWorldStates(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2466 |
int count = 0; |
| 2467 |
|
| 2468 |
// Skip header stuff |
| 2469 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2470 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2471 |
|
| 2472 |
uint8_tcxx . . $ uint8_t# rxdigest[16]; |
| 2473 |
for (int i = 0; i < 16; i++) { |
| 2474 |
rxdigest[i] = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2475 |
} |
| 2476 |
|
| 2477 |
char dbgmsg[1024]; |
| 2478 |
char expectedstr[50] = ""; |
| 2479 |
char gotstr[50] = ""; |
| 2480 |
for (int j = 0; j < 16; j++) { |
| 2481 |
char bstr[10]; |
| 2482 |
snprintf(bstr, sizeof(bstr), "%.2x", rxdigest[j] & 0xff); |
| 2483 |
strcat(gotstr, bstr); |
| 2484 |
snprintf(bstr, sizeof(bstr), "%.2x", NetPlayerscxx . . $ NetPlayers.[slot].digestcxx . . $ netplayer#digest.[j] & 0xff); |
| 2485 |
strcat(expectedstr, bstr); |
| 2486 |
} |
| 2487 |
snprintf(dbgmsg, sizeof(dbgmsg), "Expected %s for the digest, got %s for player %d\n", expectedstr, gotstr, slot); |
| 2488 |
|
| 2489 |
for (int i = 0; i < 16; i++) { |
| 2490 |
// We got the digest from the player previously. Now see if it matches. |
| 2491 |
if (rxdigest[i] != NetPlayerscxx . . $ NetPlayers.[slot].digestcxx . . $ netplayer#digest.[i]) { |
| 2492 |
// send 'bad checksum message.' |
| 2493 |
MultiSendBadChecksumcxx . . $ MultiSendBadChecksum(d4f767463ce0a6b3).(slot); |
| 2494 |
|
| 2495 |
// Bad checksum, kick the player out. |
| 2496 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_PREGAMEcxx . . $ `Descent3/multi_external.h:148:9`!; |
| 2497 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. |= NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 2498 |
return; |
| 2499 |
} |
| 2500 |
} |
| 2501 |
if (!(NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!)) { |
| 2502 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(1, "ERROR! We got a request world states packet from a disconnected player!\n"); |
| 2503 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 2504 |
return; |
| 2505 |
} |
| 2506 |
|
| 2507 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_REQUEST_WORLDcxx . . $ `Descent3/multi_external.h:159:9`!; |
| 2508 |
} |
| 2509 |
|
| 2510 |
// The server is telling me about a player in the game |
| 2511 |
// Client only |
| 2512 |
void MultiDoPlayercxx . . $ MultiDoPlayer(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2513 |
int count = 0; |
| 2514 |
char ship_name[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; |
| 2515 |
|
| 2516 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got player packet!\n"); |
| 2517 |
|
| 2518 |
// Skip header stuff |
| 2519 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2520 |
|
| 2521 |
// Get slotnumber |
| 2522 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2523 |
|
| 2524 |
// Reset some local stuff for this player |
| 2525 |
if (slot != Player_numcxx . . $ Player_num.) { |
| 2526 |
InitPlayerNewShipcxx . . $ InitPlayerNewShip(3e454b8ccf442868).(slot, INVRESET_ALLcxx . . $ `Descent3/Inventory.h:201:9`!); |
| 2527 |
InitPlayerNewGamecxx . . $ InitPlayerNewGame(d4f767463ce0a6b3).(slot); |
| 2528 |
PlayerStopSoundscxx . . $ PlayerStopSounds(d4f767463ce0a6b3).(slot); |
| 2529 |
ResetPlayerObjectcxx . . $ ResetPlayerObject(918ebd27a9ddbad3).(slot); |
| 2530 |
InitPlayerNewLevelcxx . . $ InitPlayerNewLevel(d4f767463ce0a6b3).(slot); |
| 2531 |
} |
| 2532 |
|
| 2533 |
// Get name |
| 2534 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2535 |
memcpy(Playerscxx . . $ Players.[slot].callsigncxx . . $ player#callsign., &data[count], len); |
| 2536 |
count += len; |
| 2537 |
|
| 2538 |
// Get ship name |
| 2539 |
len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2540 |
memcpy(ship_name, &data[count], len); |
| 2541 |
count += len; |
| 2542 |
|
| 2543 |
int ship_index = FindShipNamecxx . . $ FindShipName(5c4306d8553b3696).(ship_name); |
| 2544 |
if (ship_index < 0) { |
| 2545 |
ship_index = 0; // Should we bail out here? |
| 2546 |
} |
| 2547 |
|
| 2548 |
PlayerChangeShipcxx . . $ PlayerChangeShip(3e454b8ccf442868).(slot, ship_index); |
| 2549 |
|
| 2550 |
// Get various flags |
| 2551 |
if (slot != Player_numcxx . . $ Player_num.) { |
| 2552 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2553 |
Playerscxx . . $ Players.[slot].weapon_flagscxx . . $ player#weapon_flags. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2554 |
} else { |
| 2555 |
// Skip my own data |
| 2556 |
MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2557 |
MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2558 |
} |
| 2559 |
|
| 2560 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2561 |
float shields = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 2562 |
|
| 2563 |
// Get object number, just to verify |
| 2564 |
int objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 2565 |
|
| 2566 |
// Make sure we have the right object number |
| 2567 |
if (objnum != Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.) { |
| 2568 |
BailOnMultiplayercxx . . $ BailOnMultiplayer(85c52e162fed56f9).(NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 2569 |
return; |
| 2570 |
} |
| 2571 |
|
| 2572 |
// Get team |
| 2573 |
uint8_tcxx . . $ uint8_t# temp_team = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2574 |
Playerscxx . . $ Players.[slot].teamcxx . . $ player#team. = (temp_team == 255) ? -1 : temp_team; |
| 2575 |
|
| 2576 |
// Get team start |
| 2577 |
if (slot == Player_numcxx . . $ Player_num.) { |
| 2578 |
Playerscxx . . $ Players.[slot].start_indexcxx . . $ player#start_index. = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 2579 |
PlayerMoveToStartPoscxx . . $ PlayerMoveToStartPos(3e454b8ccf442868).(slot, Playerscxx . . $ Players.[slot].start_indexcxx . . $ player#start_index.); |
| 2580 |
} |
| 2581 |
|
| 2582 |
// Get observer mode |
| 2583 |
uint8_tcxx . . $ uint8_t# observing = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2584 |
|
| 2585 |
// Put in address |
| 2586 |
memcpy(&NetPlayerscxx . . $ NetPlayers.[slot].addrcxx . . $ netplayer#addr., data + count, sizeof(network_addresscxx . . $ network_address#)); |
| 2587 |
char dbg_output[50]; |
| 2588 |
nw_GetNumbersFromHostAddresscxx . . $ nw_GetNumbersFromHostAddress(29331e2dd3eba175).(&NetPlayerscxx . . $ NetPlayers.[slot].addrcxx . . $ netplayer#addr., dbg_output); |
| 2589 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got player address of: %s\n", dbg_output); |
| 2590 |
|
| 2591 |
count += sizeof(network_addresscxx . . $ network_address#); |
| 2592 |
|
| 2593 |
// PPS |
| 2594 |
NetPlayerscxx . . $ NetPlayers.[slot].ppscxx . . $ netplayer#pps. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2595 |
|
| 2596 |
// pilot picture id |
| 2597 |
NetPlayerscxx . . $ NetPlayers.[slot].pilot_pic_idcxx . . $ netplayer#pilot_pic_id. = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 2598 |
|
| 2599 |
// Get ranking |
| 2600 |
Playerscxx . . $ Players.[slot].rankcxx . . $ player#rank. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 2601 |
|
| 2602 |
// Get tracker id |
| 2603 |
if (Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game.) { |
| 2604 |
int len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2605 |
memcpy(Playerscxx . . $ Players.[slot].tracker_idcxx . . $ player#tracker_id., &data[count], len); |
| 2606 |
count += len; |
| 2607 |
} |
| 2608 |
|
| 2609 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[objnum]; |
| 2610 |
obj->idcxx . . $ object#id. = slot; |
| 2611 |
|
| 2612 |
MultiMakePlayerRealcxx . . $ MultiMakePlayerReal(d4f767463ce0a6b3).(slot); |
| 2613 |
|
| 2614 |
if (Player_numcxx . . $ Player_num. != slot) { |
| 2615 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!; |
| 2616 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. |= NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 2617 |
} |
| 2618 |
|
| 2619 |
if (slot != Player_numcxx . . $ Player_num.) { |
| 2620 |
obj->shieldscxx . . $ object#shields. = shields; |
| 2621 |
if (Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!) { |
| 2622 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Incoming %d player is dead!\n", slot); |
| 2623 |
MultiMakePlayerGhostcxx . . $ MultiMakePlayerGhost(d4f767463ce0a6b3).(slot); |
| 2624 |
} else if (Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`!) { |
| 2625 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Incoming %d player is dying!\n", slot); |
| 2626 |
int save_flags = Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags.; |
| 2627 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. &= ~(PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`! | PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`!); |
| 2628 |
InitiatePlayerDeathcxx . . $ InitiatePlayerDeath(638d79040b3e553a).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.], false, 0); |
| 2629 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. = save_flags; |
| 2630 |
} |
| 2631 |
} |
| 2632 |
|
| 2633 |
obj->flagscxx . . $ object#flags. |= OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!; |
| 2634 |
|
| 2635 |
if (observing) { |
| 2636 |
obj->render_typecxx . . $ object#render_type. = RT_NONEcxx . . $ `Descent3/object_external.h:257:9`!; |
| 2637 |
obj->typecxx . . $ object#type. = OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`!; |
| 2638 |
} |
| 2639 |
|
| 2640 |
if (slot == 0) { |
| 2641 |
memcpy(&NetPlayerscxx . . $ NetPlayers.[slot].addrcxx . . $ netplayer#addr., &Netgamecxx . . $ Netgame..server_addresscxx . . $ netgame_info#server_address., sizeof(network_addresscxx . . $ network_address#)); |
| 2642 |
} |
| 2643 |
} |
| 2644 |
|
| 2645 |
// Tells all our clients about a new player entering the game |
| 2646 |
void MultiSendNewPlayercxx . . $ MultiSendNewPlayer(d4f767463ce0a6b3).(int slot) {} |
| 2647 |
|
| 2648 |
void MultiDoPlayerEnteredGamecxx . . $ MultiDoPlayerEnteredGame(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2649 |
int count = 0; |
| 2650 |
char ship_name[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; |
| 2651 |
int length; |
| 2652 |
|
| 2653 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got player entered game packet!\n"); |
| 2654 |
|
| 2655 |
// Skip header stuff |
| 2656 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2657 |
|
| 2658 |
// Get slot number for this player |
| 2659 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2660 |
|
| 2661 |
if (slot > MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!) |
| 2662 |
return; |
| 2663 |
|
| 2664 |
ScoreAPIPlayerJoincxx . . $ ScoreAPIPlayerJoin(d4f767463ce0a6b3).(slot); |
| 2665 |
// get name |
| 2666 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2667 |
|
| 2668 |
if (len > CALLSIGN_LENcxx . . $ `Descent3/player_external_struct.h:89:9`!) |
| 2669 |
length = CALLSIGN_LENcxx . . $ `Descent3/player_external_struct.h:89:9`!; |
| 2670 |
else |
| 2671 |
length = len; |
| 2672 |
|
| 2673 |
memcpy(Playerscxx . . $ Players.[slot].callsigncxx . . $ player#callsign., &data[count], length); |
| 2674 |
count += len; |
| 2675 |
|
| 2676 |
// get ship name |
| 2677 |
len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2678 |
memcpy(ship_name, &data[count], len); |
| 2679 |
count += len; |
| 2680 |
|
| 2681 |
int ship_index = FindShipNamecxx . . $ FindShipName(5c4306d8553b3696).(ship_name); |
| 2682 |
if (ship_index < 0) |
| 2683 |
ship_index = 0; |
| 2684 |
|
| 2685 |
// Get various flags |
| 2686 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2687 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2688 |
|
| 2689 |
// Verify object number |
| 2690 |
int objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 2691 |
|
| 2692 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(objnum == Players[slot].objnum, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 2693 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Objects[objnum].id == slot, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 2694 |
|
| 2695 |
// Get the player's network address |
| 2696 |
memcpy(&NetPlayerscxx . . $ NetPlayers.[slot].addrcxx . . $ netplayer#addr., data + count, sizeof(network_addresscxx . . $ network_address#)); |
| 2697 |
count += sizeof(network_addresscxx . . $ network_address#); |
| 2698 |
|
| 2699 |
// Get PPS |
| 2700 |
NetPlayerscxx . . $ NetPlayers.[slot].ppscxx . . $ netplayer#pps. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2701 |
|
| 2702 |
// pilot picture id |
| 2703 |
NetPlayerscxx . . $ NetPlayers.[slot].pilot_pic_idcxx . . $ netplayer#pilot_pic_id. = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 2704 |
|
| 2705 |
Playerscxx . . $ Players.[slot].start_indexcxx . . $ player#start_index. = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 2706 |
|
| 2707 |
// Get ranking |
| 2708 |
Playerscxx . . $ Players.[slot].rankcxx . . $ player#rank. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 2709 |
|
| 2710 |
// Get tracker id |
| 2711 |
if (Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game.) { |
| 2712 |
int len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2713 |
memcpy(Playerscxx . . $ Players.[slot].tracker_idcxx . . $ player#tracker_id., &data[count], len); |
| 2714 |
count += len; |
| 2715 |
|
| 2716 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. &= ~NPF_WROTE_RANKcxx . . $ `Descent3/multi_external.h:171:9`!; |
| 2717 |
} |
| 2718 |
|
| 2719 |
if (Player_numcxx . . $ Player_num. != slot && NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) { |
| 2720 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!; |
| 2721 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. |= NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 2722 |
} |
| 2723 |
|
| 2724 |
InitPlayerNewShipcxx . . $ InitPlayerNewShip(3e454b8ccf442868).(slot, INVRESET_ALLcxx . . $ `Descent3/Inventory.h:201:9`!); |
| 2725 |
InitPlayerNewGamecxx . . $ InitPlayerNewGame(d4f767463ce0a6b3).(slot); |
| 2726 |
PlayerStopSoundscxx . . $ PlayerStopSounds(d4f767463ce0a6b3).(slot); |
| 2727 |
ResetPlayerObjectcxx . . $ ResetPlayerObject(918ebd27a9ddbad3).(slot); |
| 2728 |
InitPlayerNewLevelcxx . . $ InitPlayerNewLevel(d4f767463ce0a6b3).(slot); |
| 2729 |
PlayerChangeShipcxx . . $ PlayerChangeShip(3e454b8ccf442868).(slot, ship_index); |
| 2730 |
PlayerMoveToStartPoscxx . . $ PlayerMoveToStartPos(3e454b8ccf442868).(slot, Playerscxx . . $ Players.[slot].start_indexcxx . . $ player#start_index.); |
| 2731 |
MultiMakePlayerRealcxx . . $ MultiMakePlayerReal(d4f767463ce0a6b3).(slot); |
| 2732 |
Objectscxx . . $ Objects.[objnum].flagscxx . . $ object#flags. |= OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!; |
| 2733 |
|
| 2734 |
MultiAnnounceEffectcxx . . $ MultiAnnounceEffect(4359ca8c31d2d955).(&Objectscxx . . $ Objects.[objnum], Objectscxx . . $ Objects.[objnum].sizecxx . . $ object#size. * 5, 1.0); |
| 2735 |
NetPlayerscxx . . $ NetPlayers.[slot].total_bytes_sentcxx . . $ netplayer#total_bytes_sent. = 0; |
| 2736 |
NetPlayerscxx . . $ NetPlayers.[slot].total_bytes_rcvdcxx . . $ netplayer#total_bytes_rcvd. = 0; |
| 2737 |
NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. = NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!; |
| 2738 |
} |
| 2739 |
|
| 2740 |
// Sends a new player to existing players |
| 2741 |
// Sends to "slot" and describes player "which" |
| 2742 |
// Server only |
| 2743 |
void MultiSendPlayerEnteredGamecxx . . $ MultiSendPlayerEnteredGame(d4f767463ce0a6b3).(int which) { |
| 2744 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 2745 |
|
| 2746 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 2747 |
int count = 0; |
| 2748 |
int size_offset; |
| 2749 |
|
| 2750 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYER_ENTERED_GAMEcxx . . $ `Descent3/multi.h:547:9`!, data, &count, 1); |
| 2751 |
|
| 2752 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(which, data, &count); |
| 2753 |
|
| 2754 |
// Add name |
| 2755 |
int len = strlen(Playerscxx . . $ Players.[which].callsigncxx . . $ player#callsign.) + 1; |
| 2756 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, data, &count); |
| 2757 |
memcpy(&data[count], Playerscxx . . $ Players.[which].callsigncxx . . $ player#callsign., len); |
| 2758 |
count += len; |
| 2759 |
|
| 2760 |
// Add ship name |
| 2761 |
len = strlen(Shipscxx . . $ Ships.[Playerscxx . . $ Players.[which].ship_indexcxx . . $ player#ship_index.].namecxx . . $ ship#name.) + 1; |
| 2762 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, data, &count); |
| 2763 |
memcpy(&data[count], Shipscxx . . $ Ships.[Playerscxx . . $ Players.[which].ship_indexcxx . . $ player#ship_index.].namecxx . . $ ship#name., len); |
| 2764 |
count += len; |
| 2765 |
|
| 2766 |
// Add flags |
| 2767 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(Playerscxx . . $ Players.[which].flagscxx . . $ player#flags., data, &count); |
| 2768 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(NetPlayerscxx . . $ NetPlayers.[which].flagscxx . . $ netplayer#flags., data, &count); |
| 2769 |
|
| 2770 |
// Just for safety sake send the object number |
| 2771 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(Playerscxx . . $ Players.[which].objnumcxx . . $ player#objnum., data, &count); |
| 2772 |
|
| 2773 |
// Add the player's network address. |
| 2774 |
memcpy(data + count, &NetPlayerscxx . . $ NetPlayers.[which].addrcxx . . $ netplayer#addr., sizeof(network_addresscxx . . $ network_address#)); |
| 2775 |
count += sizeof(network_addresscxx . . $ network_address#); |
| 2776 |
|
| 2777 |
// Add pps |
| 2778 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(NetPlayerscxx . . $ NetPlayers.[which].ppscxx . . $ netplayer#pps., data, &count); |
| 2779 |
|
| 2780 |
// pilot picture id |
| 2781 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(NetPlayerscxx . . $ NetPlayers.[which].pilot_pic_idcxx . . $ netplayer#pilot_pic_id., data, &count); |
| 2782 |
|
| 2783 |
// Add start position |
| 2784 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(Playerscxx . . $ Players.[which].start_indexcxx . . $ player#start_index., data, &count); |
| 2785 |
|
| 2786 |
// Send ranking |
| 2787 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(Playerscxx . . $ Players.[which].rankcxx . . $ player#rank., data, &count); |
| 2788 |
|
| 2789 |
// Send tracker id |
| 2790 |
if (Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game.) { |
| 2791 |
int len = strlen(Playerscxx . . $ Players.[which].tracker_idcxx . . $ player#tracker_id.) + 1; |
| 2792 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, data, &count); |
| 2793 |
memcpy(&data[count], Playerscxx . . $ Players.[which].tracker_idcxx . . $ player#tracker_id., len); |
| 2794 |
count += len; |
| 2795 |
} |
| 2796 |
|
| 2797 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 2798 |
|
| 2799 |
// Send it out |
| 2800 |
|
| 2801 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(which, data, count, NETSEQ_REQUEST_BUILDINGScxx . . $ `Descent3/multi_external.h:155:9`!); |
| 2802 |
MultiDoPlayerEnteredGamecxx . . $ MultiDoPlayerEnteredGame(f25546b61a629de7).(data); |
| 2803 |
} |
| 2804 |
|
| 2805 |
// Client is saying that he's entering the game |
| 2806 |
// Server only |
| 2807 |
void MultiDoEnteringGamecxx . . $ MultiDoEnteringGame(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2808 |
int count = 0; |
| 2809 |
|
| 2810 |
// Skip header stuff |
| 2811 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2812 |
|
| 2813 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2814 |
|
| 2815 |
if (!(NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!)) { |
| 2816 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 2817 |
return; |
| 2818 |
} |
| 2819 |
|
| 2820 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client %d (%s) entering game.\n", slot, Players[slot].callsign); |
| 2821 |
|
| 2822 |
MultiSendPlayerEnteredGamecxx . . $ MultiSendPlayerEnteredGame(d4f767463ce0a6b3).(slot); |
| 2823 |
|
| 2824 |
// send the player the audio taunt delay time |
| 2825 |
MultiSetAudioTauntTimecxx . . $ MultiSetAudioTauntTime(1746e8aa98ca1bc0).(taunt_DelayTimecxx . . $ taunt_DelayTime(9b8c9e39889c762c).(), slot); |
| 2826 |
|
| 2827 |
Level_goalscxx . . $ Level_goals..MultiSendChangedGoalscxx . . $ levelgoals#MultiSendChangedGoals(d4f767463ce0a6b3).(slot); |
| 2828 |
|
| 2829 |
// add his guidebot (if it is a guidebot game) |
| 2830 |
// NOTE: It is possible that DMFC may InitPlayerNewShip after this |
| 2831 |
// so it is placed as a precaution in their also |
| 2832 |
if (Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_ALLOWGUIDEBOTcxx . . $ `Descent3/multi_external.h:232:9`!) { |
| 2833 |
if ((!Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..CheckItemcxx . . $ Inventory#CheckItem(cf9ef193275fa6d8).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!)) && |
| 2834 |
(ObjGetcxx . . $ ObjGet(11672e354c0b263a).(Buddy_handlecxx . . $ Buddy_handle.[slot])->typecxx . . $ object#type. != OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!)) |
| 2835 |
Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!); |
| 2836 |
} |
| 2837 |
|
| 2838 |
DLLInfocxx . . $ DLLInfo..me_handlecxx . . $ dllinfo#me_handle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 2839 |
DLLInfocxx . . $ DLLInfo..it_handlecxx . . $ dllinfo#it_handle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 2840 |
CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(EVT_GAMEPLAYERENTERSGAMEcxx . . $ `lib/d3events.h:70:9`!, &DLLInfocxx . . $ DLLInfo.); |
| 2841 |
|
| 2842 |
// Clear vis info |
| 2843 |
for (int i = 0; i < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!; i++) { |
| 2844 |
Objectscxx . . $ Objects.[i].generic_nonvis_flagscxx . . $ object#generic_nonvis_flags. &= ~(1 << slot); |
| 2845 |
Objectscxx . . $ Objects.[i].generic_sent_nonviscxx . . $ object#generic_sent_nonvis. &= ~(1 << slot); |
| 2846 |
} |
| 2847 |
} |
| 2848 |
|
| 2849 |
// Tell the server I'm entering the game |
| 2850 |
void MultiSendEnteringGamecxx . . $ MultiSendEnteringGame(49f6e7a06ebc5aa8).() { |
| 2851 |
int size; |
| 2852 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 2853 |
int count = 0; |
| 2854 |
|
| 2855 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending entering game\n"); |
| 2856 |
|
| 2857 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ENTERING_GAMEcxx . . $ `Descent3/multi.h:531:9`!, data, &count); |
| 2858 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 2859 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 2860 |
|
| 2861 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 2862 |
} |
| 2863 |
|
| 2864 |
// Tell my clients about damage done to a player |
| 2865 |
// Server only |
| 2866 |
void MultiSendDamagePlayercxx . . $ MultiSendDamagePlayer(3c27ae030892e7bf).(int slot, int weapon_id, int type, float amount) { |
| 2867 |
int count = 0; |
| 2868 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 2869 |
int size_offset; |
| 2870 |
|
| 2871 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 2872 |
|
| 2873 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_DAMAGE_PLAYERcxx . . $ `Descent3/multi.h:548:9`!, data, &count, 1); |
| 2874 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 2875 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(weapon_id, data, &count); |
| 2876 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(type, data, &count); |
| 2877 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(amount, data, &count); |
| 2878 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 2879 |
|
| 2880 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, true); |
| 2881 |
} |
| 2882 |
|
| 2883 |
// The server says to damage a player, so do it! |
| 2884 |
void MultiDoDamagePlayercxx . . $ MultiDoDamagePlayer(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2885 |
|
| 2886 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 2887 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 2888 |
return; |
| 2889 |
} |
| 2890 |
|
| 2891 |
int count = 0; |
| 2892 |
|
| 2893 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2894 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2895 |
uint8_tcxx . . $ uint8_t# weapon_id = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2896 |
uint8_tcxx . . $ uint8_t# type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2897 |
float amount = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 2898 |
|
| 2899 |
ApplyDamageToPlayercxx . . $ ApplyDamageToPlayer(1fbfa7277d8ac7b4).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.], NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!, type, amount, 1, weapon_id); |
| 2900 |
} |
| 2901 |
|
| 2902 |
// Makes the passed in player a ghost |
| 2903 |
void MultiMakePlayerGhostcxx . . $ MultiMakePlayerGhost(d4f767463ce0a6b3).(int slot) { |
| 2904 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.]; |
| 2905 |
|
| 2906 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(obj->id == slot, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); // Get Jason |
| 2907 |
|
| 2908 |
obj->typecxx . . $ object#type. = OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`!; |
| 2909 |
obj->movement_typecxx . . $ object#movement_type. = MT_NONEcxx . . $ `Descent3/object_external.h:233:9`!; |
| 2910 |
obj->render_typecxx . . $ object#render_type. = RT_NONEcxx . . $ `Descent3/object_external.h:257:9`!; |
| 2911 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. |= PF_NO_COLLIDEcxx . . $ `Descent3/object_external.h:331:9`!; |
| 2912 |
SetObjectControlTypecxx . . $ SetObjectControlType(766a1b7183ffa4b4).(obj, CT_NONEcxx . . $ `Descent3/object_external.h:216:9`!); |
| 2913 |
|
| 2914 |
if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 2915 |
DemoWritePlayerTypeChangecxx . . $ DemoWritePlayerTypeChange(e0a2f7eef77c900a).(slot); |
| 2916 |
} |
| 2917 |
|
| 2918 |
// Stop sounds for this player |
| 2919 |
PlayerStopSoundscxx . . $ PlayerStopSounds(d4f767463ce0a6b3).(slot); |
| 2920 |
} |
| 2921 |
|
| 2922 |
// Makes the passed in player real (non-ghost) |
| 2923 |
void MultiMakePlayerRealcxx . . $ MultiMakePlayerReal(d4f767463ce0a6b3).(int slot) { |
| 2924 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.]; |
| 2925 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(obj->id == slot, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); // Get Jason |
| 2926 |
|
| 2927 |
obj->typecxx . . $ object#type. = OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!; |
| 2928 |
|
| 2929 |
if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 2930 |
DemoWritePlayerTypeChangecxx . . $ DemoWritePlayerTypeChange(e0a2f7eef77c900a).(slot); |
| 2931 |
} |
| 2932 |
|
| 2933 |
obj->render_typecxx . . $ object#render_type. = RT_POLYOBJcxx . . $ `Descent3/object_external.h:258:9`!; |
| 2934 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. &= ~PF_NO_COLLIDEcxx . . $ `Descent3/object_external.h:331:9`!; |
| 2935 |
|
| 2936 |
if (slot == Player_numcxx . . $ Player_num.) { |
| 2937 |
SetObjectControlTypecxx . . $ SetObjectControlType(766a1b7183ffa4b4).(obj, CT_FLYINGcxx . . $ `Descent3/object_external.h:219:9`!); |
| 2938 |
obj->movement_typecxx . . $ object#movement_type. = MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!; |
| 2939 |
Viewer_objectcxx . . $ Viewer_object. = Player_objectcxx . . $ Player_object. = obj; |
| 2940 |
} else { |
| 2941 |
obj->movement_typecxx . . $ object#movement_type. = MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!; |
| 2942 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. = PF_FIXED_VELOCITYcxx . . $ `Descent3/object_external.h:324:9`!; |
| 2943 |
SetObjectControlTypecxx . . $ SetObjectControlType(766a1b7183ffa4b4).(obj, CT_NONEcxx . . $ `Descent3/object_external.h:216:9`!); |
| 2944 |
} |
| 2945 |
} |
| 2946 |
|
| 2947 |
// Server is telling us that its done sending players |
| 2948 |
void MultiDoDonePlayerscxx . . $ MultiDoDonePlayers(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2949 |
int count = 0; |
| 2950 |
|
| 2951 |
// Skip header stuff |
| 2952 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2953 |
|
| 2954 |
uint8_tcxx . . $ uint8_t# num = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 2955 |
if (MultiCountPlayerscxx . . $ MultiCountPlayers(b126dc7c1de90089).() != num) { |
| 2956 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(1, "ERROR! We don't have the correct number of players!"); |
| 2957 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 2958 |
return; |
| 2959 |
} |
| 2960 |
|
| 2961 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. = NETSEQ_REQUEST_BUILDINGScxx . . $ `Descent3/multi_external.h:155:9`!; |
| 2962 |
} |
| 2963 |
|
| 2964 |
// Server is telling us that its done sending buildings |
| 2965 |
void MultiDoDoneBuildingscxx . . $ MultiDoDoneBuildings(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2966 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 2967 |
|
| 2968 |
int count = 0; |
| 2969 |
|
| 2970 |
// Skip header stuff |
| 2971 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2972 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. = NETSEQ_REQUEST_OBJECTScxx . . $ `Descent3/multi_external.h:157:9`!; |
| 2973 |
} |
| 2974 |
|
| 2975 |
// Server is telling us that its done sending objects |
| 2976 |
void MultiDoDoneObjectscxx . . $ MultiDoDoneObjects(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 2977 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 2978 |
|
| 2979 |
int count = 0; |
| 2980 |
|
| 2981 |
// Skip header stuff |
| 2982 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 2983 |
// Get the salt. |
| 2984 |
MD5cxx . . $ MD5# playermd5(*Level_md5cxx . . $ Level_md5.); |
| 2985 |
// Get the salt value from the server. |
| 2986 |
int salt = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 2987 |
// process the salt through the md5 |
| 2988 |
playermd5.updatecxx . . $ MD5#update(f349c77f591a7878).(salt); |
| 2989 |
// process the ships through the md5 |
| 2990 |
for (int i = 0; i < MAX_SHIPScxx . . $ `Descent3/ship.h:122:9`!; i++) |
| 2991 |
if (Shipscxx . . $ Ships.[i].usedcxx . . $ ship#used.) |
| 2992 |
MultiProcessShipChecksumcxx . . $ MultiProcessShipChecksum(54a9d97b34104f61).(&playermd5, i); |
| 2993 |
// save the digest value to send to the server |
| 2994 |
playermd5.digestcxx . . $ MD5#digest(2c93ef52c863c53f).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].digestcxx . . $ netplayer#digest.); |
| 2995 |
|
| 2996 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. = NETSEQ_REQUEST_WORLDcxx . . $ `Descent3/multi_external.h:159:9`!; |
| 2997 |
|
| 2998 |
// Clear out all the lightmapped objects that weren't sent |
| 2999 |
for (int i = 0; i < Num_client_lm_objectscxx . . $ Num_client_lm_objects.; i++) { |
| 3000 |
int objnum = Client_lightmap_listcxx . . $ Client_lightmap_list.[i]; |
| 3001 |
int found = 0; |
| 3002 |
for (int t = 0; t < Num_server_lm_objectscxx . . $ Num_server_lm_objects. && !found; t++) { |
| 3003 |
if (Server_lightmap_listcxx . . $ Server_lightmap_list.[t] == objnum) |
| 3004 |
found = 1; |
| 3005 |
} |
| 3006 |
|
| 3007 |
// If its not in the server list, delete it! |
| 3008 |
if (!found) { |
| 3009 |
Objectscxx . . $ Objects.[objnum].flagscxx . . $ object#flags. |= OF_SERVER_SAYS_DELETEcxx . . $ `Descent3/object_external.h:290:9`!; |
| 3010 |
ObjDeletecxx . . $ ObjDelete(d4f767463ce0a6b3).(objnum); |
| 3011 |
} |
| 3012 |
} |
| 3013 |
} |
| 3014 |
|
| 3015 |
// Server is telling us that its done sending objects |
| 3016 |
void MultiDoDoneWorldStatescxx . . $ MultiDoDoneWorldStates(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3017 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 3018 |
|
| 3019 |
int count = 0; |
| 3020 |
|
| 3021 |
// Skip header stuff |
| 3022 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3023 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. = NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!; |
| 3024 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].total_bytes_sentcxx . . $ netplayer#total_bytes_sent. = 0; |
| 3025 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].total_bytes_rcvdcxx . . $ netplayer#total_bytes_rcvd. = 0; |
| 3026 |
PlayerMoveToStartPoscxx . . $ PlayerMoveToStartPos(3e454b8ccf442868).(Player_numcxx . . $ Player_num., Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].start_indexcxx . . $ player#start_index.); |
| 3027 |
|
| 3028 |
MultiSendEnteringGamecxx . . $ MultiSendEnteringGame(49f6e7a06ebc5aa8).(); |
| 3029 |
} |
| 3030 |
|
| 3031 |
// Makes an abbrievated version of a matrix |
| 3032 |
void MultiMakeMatrixcxx . . $ MultiMakeMatrix(fa48605267a12641).(multi_orientationcxx . . $ multi_orientation# *dest, matrixcxx . . $ matrix# *src) { |
| 3033 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[0] = (src->rveccxx . . $ matrix#rvec..xcxx . . $ vector#x. * 32767.0); |
| 3034 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[1] = (src->rveccxx . . $ matrix#rvec..ycxx . . $ vector#y. * 32767.0); |
| 3035 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[2] = (src->rveccxx . . $ matrix#rvec..zcxx . . $ vector#z. * 32767.0); |
| 3036 |
|
| 3037 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[3] = (src->uveccxx . . $ matrix#uvec..xcxx . . $ vector#x. * 32767.0); |
| 3038 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[4] = (src->uveccxx . . $ matrix#uvec..ycxx . . $ vector#y. * 32767.0); |
| 3039 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[5] = (src->uveccxx . . $ matrix#uvec..zcxx . . $ vector#z. * 32767.0); |
| 3040 |
|
| 3041 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[6] = (src->fveccxx . . $ matrix#fvec..xcxx . . $ vector#x. * 32767.0); |
| 3042 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[7] = (src->fveccxx . . $ matrix#fvec..ycxx . . $ vector#y. * 32767.0); |
| 3043 |
dest->multi_matrixcxx . . $ multi_orientation#multi_matrix.[8] = (src->fveccxx . . $ matrix#fvec..zcxx . . $ vector#z. * 32767.0); |
| 3044 |
} |
| 3045 |
|
| 3046 |
// Extracts a matrix from an abbreviated matrix |
| 3047 |
void MultiExtractMatrixcxx . . $ MultiExtractMatrix(b91390fee78ca2c4).(matrixcxx . . $ matrix# *dest, multi_orientationcxx . . $ multi_orientation# *src) { |
| 3048 |
dest->rveccxx . . $ matrix#rvec..xcxx . . $ vector#x. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[0] / 32767.0; |
| 3049 |
dest->rveccxx . . $ matrix#rvec..ycxx . . $ vector#y. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[1] / 32767.0; |
| 3050 |
dest->rveccxx . . $ matrix#rvec..zcxx . . $ vector#z. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[2] / 32767.0; |
| 3051 |
|
| 3052 |
dest->uveccxx . . $ matrix#uvec..xcxx . . $ vector#x. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[3] / 32767.0; |
| 3053 |
dest->uveccxx . . $ matrix#uvec..ycxx . . $ vector#y. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[4] / 32767.0; |
| 3054 |
dest->uveccxx . . $ matrix#uvec..zcxx . . $ vector#z. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[5] / 32767.0; |
| 3055 |
|
| 3056 |
dest->fveccxx . . $ matrix#fvec..xcxx . . $ vector#x. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[6] / 32767.0; |
| 3057 |
dest->fveccxx . . $ matrix#fvec..ycxx . . $ vector#y. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[7] / 32767.0; |
| 3058 |
dest->fveccxx . . $ matrix#fvec..zcxx . . $ vector#z. = (float)src->multi_matrixcxx . . $ multi_orientation#multi_matrix.[8] / 32767.0; |
| 3059 |
} |
| 3060 |
|
| 3061 |
void MultiDoPlayerPoscxx . . $ MultiDoPlayerPos(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3062 |
int use_smoothing = (Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_USE_SMOOTHINGcxx . . $ `Descent3/multi_external.h:237:9`!); |
| 3063 |
int count = 0; |
| 3064 |
|
| 3065 |
// Skip header stuff |
| 3066 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3067 |
|
| 3068 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3069 |
|
| 3070 |
// Make sure its not out of order |
| 3071 |
float packet_time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 3072 |
if (packet_time < NetPlayerscxx . . $ NetPlayers.[slot].packet_timecxx . . $ netplayer#packet_time.) |
| 3073 |
return; |
| 3074 |
NetPlayerscxx . . $ NetPlayers.[slot].packet_timecxx . . $ netplayer#packet_time. = packet_time; |
| 3075 |
|
| 3076 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.]; |
| 3077 |
|
| 3078 |
vectorcxx . . $ vector# pos; |
| 3079 |
matrixcxx . . $ matrix# orient; |
| 3080 |
uint16_tcxx . . $ uint16_t# short_roomnum; |
| 3081 |
int roomnum; |
| 3082 |
|
| 3083 |
// Get position |
| 3084 |
MultiExtractPositionDatacxx . . $ MultiExtractPositionData(960cd16f6e188b41).(&pos, data, &count); |
| 3085 |
|
| 3086 |
// Get orientation |
| 3087 |
uint16_tcxx . . $ uint16_t# p = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 3088 |
uint16_tcxx . . $ uint16_t# h = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 3089 |
uint16_tcxx . . $ uint16_t# b = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 3090 |
|
| 3091 |
vm_AnglesToMatrixcxx . . $ vm_AnglesToMatrix(654fa9e3c9c3be99).(&orient, p, h, b); |
| 3092 |
|
| 3093 |
// Get room and terrain flag |
| 3094 |
short_roomnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 3095 |
|
| 3096 |
roomnum = short_roomnum; |
| 3097 |
|
| 3098 |
vectorcxx . . $ vector# vel = {0, 0, 0}, rotvel; |
| 3099 |
anglecxx . . $ angle# turnroll; |
| 3100 |
|
| 3101 |
// float dist=vm_VectorDistance (&pos,&obj->pos); |
| 3102 |
|
| 3103 |
// Get velocity |
| 3104 |
vel.xcxx . . $ vector#x. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 3105 |
vel.ycxx . . $ vector#y. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 3106 |
vel.zcxx . . $ vector#z. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 3107 |
|
| 3108 |
// mprintf(0,"INCOMING x=%f y=%f z=%f dist=%f\n",vel.x,vel.y,vel.z,dist); |
| 3109 |
|
| 3110 |
// Get rotational velocity |
| 3111 |
if (Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_SENDROTVELcxx . . $ `Descent3/multi_external.h:231:9`!) { |
| 3112 |
rotvel.xcxx . . $ vector#x. = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count) * 4; |
| 3113 |
rotvel.ycxx . . $ vector#y. = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count) * 4; |
| 3114 |
rotvel.zcxx . . $ vector#z. = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count) * 4; |
| 3115 |
|
| 3116 |
turnroll = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 3117 |
|
| 3118 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). rotvel; |
| 3119 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..turnrollcxx . . $ physics_info#turnroll. = turnroll; |
| 3120 |
} |
| 3121 |
|
| 3122 |
// obj->mtype.phys_info.velocity=vel; |
| 3123 |
|
| 3124 |
// Get weapon states |
| 3125 |
uint8_tcxx . . $ uint8_t# windex = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3126 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!].indexcxx . . $ player_weapon#index. = windex & 0x0F; |
| 3127 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!].indexcxx . . $ player_weapon#index. = (windex >> 4) + 10; |
| 3128 |
|
| 3129 |
// Get energy |
| 3130 |
Playerscxx . . $ Players.[slot].energycxx . . $ player#energy. = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 3131 |
// Get flags |
| 3132 |
uint8_tcxx . . $ uint8_t# flags = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3133 |
|
| 3134 |
// Do special stuff for non-visible objects |
| 3135 |
bool visible = true; |
| 3136 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].render_typecxx . . $ object#render_type. == RT_NONEcxx . . $ `Descent3/object_external.h:257:9`!) |
| 3137 |
visible = false; |
| 3138 |
|
| 3139 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3140 |
// Stop cheating with on/off weapons (can't fire things you shouldn't have!) |
| 3141 |
playercxx . . $ player# *playp = &Playerscxx . . $ Players.[slot]; |
| 3142 |
if (!(playp->weapon_flagscxx . . $ player#weapon_flags. & (1 << Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!].indexcxx . . $ player_weapon#index.))) |
| 3143 |
flags &= ~(MPF_SPRAYcxx . . $ `Descent3/multi.cpp:1837:9`! | MPF_ON_OFFcxx . . $ `Descent3/multi.cpp:1838:9`!); |
| 3144 |
|
| 3145 |
if (Player_pos_fixcxx . . $ Player_pos_fix.[slot].activecxx . . $ player_pos_suppress#active.) { |
| 3146 |
if (Player_pos_fixcxx . . $ Player_pos_fix.[slot].expire_timecxx . . $ player_pos_suppress#expire_time. <= Gametimecxx . . $ Gametime.) { |
| 3147 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].activecxx . . $ player_pos_suppress#active. = false; |
| 3148 |
// PrintDedicatedMessage("Discarded %d position updates from %s timed out |
| 3149 |
// though.\n",Player_pos_fix[slot].ignored_pos,Players[slot].callsign); |
| 3150 |
} |
| 3151 |
} |
| 3152 |
} |
| 3153 |
|
| 3154 |
if ((flags & MPF_SPRAYcxx . . $ `Descent3/multi.cpp:1837:9`!) && visible) |
| 3155 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. |= WFF_SPRAYcxx . . $ `Descent3/player_external.h:103:9`!; |
| 3156 |
else |
| 3157 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. &= ~WFF_SPRAYcxx . . $ `Descent3/player_external.h:103:9`!; |
| 3158 |
|
| 3159 |
if ((flags & MPF_ON_OFFcxx . . $ `Descent3/multi.cpp:1838:9`!) && visible) { |
| 3160 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. |= WFF_ON_OFFcxx . . $ `Descent3/player_external.h:104:9`!; |
| 3161 |
} else |
| 3162 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. &= ~WFF_ON_OFFcxx . . $ `Descent3/player_external.h:104:9`!; |
| 3163 |
|
| 3164 |
if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 3165 |
DemoWriteObjWeapFireFlagChangedcxx . . $ DemoWriteObjWeapFireFlagChanged(68e3ae50fe6578a9).(Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.); |
| 3166 |
} |
| 3167 |
|
| 3168 |
if ((flags & MPF_AFTERBURNERcxx . . $ `Descent3/multi.cpp:1833:9`!) && !(flags & MPF_DEADcxx . . $ `Descent3/multi.cpp:1835:9`!) && visible) { |
| 3169 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. |= PLAYER_FLAGS_AFTERBURN_ONcxx . . $ `Descent3/player_external.h:92:9`!; |
| 3170 |
} else { |
| 3171 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. &= ~PLAYER_FLAGS_AFTERBURN_ONcxx . . $ `Descent3/player_external.h:92:9`!; |
| 3172 |
} |
| 3173 |
|
| 3174 |
if ((flags & MPF_THRUSTEDcxx . . $ `Descent3/multi.cpp:1840:9`!) && !(flags & MPF_DEADcxx . . $ `Descent3/multi.cpp:1835:9`!) && visible) { |
| 3175 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. |= PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!; |
| 3176 |
} else { |
| 3177 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. &= ~PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!; |
| 3178 |
} |
| 3179 |
|
| 3180 |
if ((flags & MPF_HEADLIGHTcxx . . $ `Descent3/multi.cpp:1839:9`!) && !(flags & MPF_DEADcxx . . $ `Descent3/multi.cpp:1835:9`!)) |
| 3181 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. |= PLAYER_FLAGS_HEADLIGHTcxx . . $ `Descent3/player_external.h:90:9`!; |
| 3182 |
else |
| 3183 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. &= ~PLAYER_FLAGS_HEADLIGHTcxx . . $ `Descent3/player_external.h:90:9`!; |
| 3184 |
|
| 3185 |
if (flags & MPF_OUTSIDEcxx . . $ `Descent3/multi.cpp:1834:9`!) |
| 3186 |
roomnum = MAKE_ROOMNUMcxx . . $ `lib/object_external_struct.h:124:9`!(roomnum); |
| 3187 |
|
| 3188 |
if ((flags & MPF_DEADcxx . . $ `Descent3/multi.cpp:1835:9`!)) // || (Players[slot].flags & PLAYER_FLAGS_DYING) || (Players[slot].flags & PLAYER_FLAGS_DEAD)) |
| 3189 |
return; // If dying, don't do positional updates |
| 3190 |
|
| 3191 |
if (!ROOMNUM_OUTSIDEcxx . . $ `lib/object_external_struct.h:127:9`!(roomnum)) { |
| 3192 |
// Deal with late packets from last level |
| 3193 |
|
| 3194 |
if (roomnum > Highest_room_indexcxx . . $ Highest_room_index. || roomnum < 0) |
| 3195 |
return; |
| 3196 |
|
| 3197 |
if (Roomscxx . . $ Rooms.[roomnum].usedcxx . . $ room#used. == 0) |
| 3198 |
return; |
| 3199 |
|
| 3200 |
if (Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. & RF_EXTERNALcxx . . $ `Descent3/room_external.h:177:9`!) |
| 3201 |
return; |
| 3202 |
} |
| 3203 |
|
| 3204 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`! && use_smoothing && !(flags & MPF_FIREDcxx . . $ `Descent3/multi.cpp:1836:9`!)) { |
| 3205 |
// Check to see if we need to correct this ship due to error |
| 3206 |
if (vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&pos, &obj->poscxx . . $ object#pos.) < 8) { |
| 3207 |
int pps_player_num; |
| 3208 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3209 |
pps_player_num = slot; |
| 3210 |
} else { |
| 3211 |
pps_player_num = Player_numcxx . . $ Player_num.; |
| 3212 |
} |
| 3213 |
|
| 3214 |
vectorcxx . . $ vector# dest_pos = pos +cxx . . $ operator+(b77b703cd1e43e33). (vel *cxx . . $ `operator*`(252247219a31502c). (1.0 / NetPlayerscxx . . $ NetPlayers.[pps_player_num].ppscxx . . $ netplayer#pps.)); |
| 3215 |
vel =cxx . . $ vector#`operator=`(c0842353a20857d). (dest_pos -cxx . . $ operator-(b77b703cd1e43e33). obj->poscxx . . $ object#pos.) /cxx . . $ `operator/`(252247219a31502c). (1.0 / NetPlayerscxx . . $ NetPlayers.[pps_player_num].ppscxx . . $ netplayer#pps.); |
| 3216 |
|
| 3217 |
pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). obj->poscxx . . $ object#pos.; |
| 3218 |
} |
| 3219 |
} |
| 3220 |
|
| 3221 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). vel; |
| 3222 |
|
| 3223 |
if ((Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) && (Player_pos_fixcxx . . $ Player_pos_fix.[slot].activecxx . . $ player_pos_suppress#active.) && (roomnum != Player_pos_fixcxx . . $ Player_pos_fix.[slot].roomcxx . . $ player_pos_suppress#room.)) { |
| 3224 |
// ignoring this position update....what should we do???? |
| 3225 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].ignored_poscxx . . $ player_pos_suppress#ignored_pos.++; |
| 3226 |
} else { |
| 3227 |
if (Player_pos_fixcxx . . $ Player_pos_fix.[slot].activecxx . . $ player_pos_suppress#active.) { |
| 3228 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].activecxx . . $ player_pos_suppress#active. = false; |
| 3229 |
// print some info to the server console... |
| 3230 |
// PrintDedicatedMessage("Discarded %d position updates from |
| 3231 |
// %s\n",Player_pos_fix[slot].ignored_pos,Players[slot].callsign); |
| 3232 |
} |
| 3233 |
ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &pos, roomnum, &orient, true); |
| 3234 |
} |
| 3235 |
|
| 3236 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3237 |
Playerscxx . . $ Players.[slot].oldroomcxx . . $ player#oldroom. = roomnum; |
| 3238 |
} |
| 3239 |
} |
| 3240 |
|
| 3241 |
void MultiDoRobotPoscxx . . $ MultiDoRobotPos(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3242 |
int count = 0; |
| 3243 |
//@@multi_orientation multi_mat; |
| 3244 |
// Skip header stuff |
| 3245 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3246 |
|
| 3247 |
uint16_tcxx . . $ uint16_t# server_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 3248 |
uint16_tcxx . . $ uint16_t# objectnum = Server_object_listcxx . . $ Server_object_list.[server_objnum]; |
| 3249 |
if (objectnum == 65535 || !(Objectscxx . . $ Objects.[objectnum].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!)) { |
| 3250 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bad robotposition object number!\n"); |
| 3251 |
return; |
| 3252 |
} |
| 3253 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[objectnum]; |
| 3254 |
|
| 3255 |
vectorcxx . . $ vector# pos; |
| 3256 |
matrixcxx . . $ matrix# orient; |
| 3257 |
uint16_tcxx . . $ uint16_t# short_roomnum; |
| 3258 |
int roomnum; |
| 3259 |
|
| 3260 |
// Get position |
| 3261 |
MultiExtractPositionDatacxx . . $ MultiExtractPositionData(960cd16f6e188b41).(&pos, data, &count); |
| 3262 |
|
| 3263 |
// Get orientation |
| 3264 |
uint16_tcxx . . $ uint16_t# p = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 3265 |
uint16_tcxx . . $ uint16_t# h = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 3266 |
uint16_tcxx . . $ uint16_t# b = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 3267 |
|
| 3268 |
vm_AnglesToMatrixcxx . . $ vm_AnglesToMatrix(654fa9e3c9c3be99).(&orient, p, h, b); |
| 3269 |
|
| 3270 |
// Get room and terrain flag |
| 3271 |
short_roomnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 3272 |
uint8_tcxx . . $ uint8_t# terrain = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3273 |
|
| 3274 |
roomnum = short_roomnum; |
| 3275 |
if (terrain) |
| 3276 |
roomnum = MAKE_ROOMNUMcxx . . $ `lib/object_external_struct.h:124:9`!(roomnum); |
| 3277 |
vectorcxx . . $ vector# vel = {0, 0, 0}; |
| 3278 |
|
| 3279 |
// Get velocity |
| 3280 |
vel.xcxx . . $ vector#x. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 3281 |
vel.ycxx . . $ vector#y. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 3282 |
vel.zcxx . . $ vector#z. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 3283 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). vel; |
| 3284 |
|
| 3285 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. &= ~PF_NO_COLLIDEcxx . . $ `Descent3/object_external.h:331:9`!; |
| 3286 |
obj->render_typecxx . . $ object#render_type. = RT_POLYOBJcxx . . $ `Descent3/object_external.h:258:9`!; |
| 3287 |
|
| 3288 |
if (!(obj->flagscxx . . $ object#flags. & (OF_DEADcxx . . $ `Descent3/object_external.h:270:9`!)) && obj->typecxx . . $ object#type. != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 3289 |
ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &pos, roomnum, &orient, false); |
| 3290 |
} |
| 3291 |
} |
| 3292 |
|
| 3293 |
// Stuffs a players firing information into a packet |
| 3294 |
int MultiStuffPlayerFirecxx . . $ MultiStuffPlayerFire(b2cc8657ba51080d).(int slot, uint8_tcxx . . $ uint8_t# *data) { |
| 3295 |
int size_offset; |
| 3296 |
int count = 0; |
| 3297 |
|
| 3298 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYER_FIREcxx . . $ `Descent3/multi.h:533:9`!, data, &count); |
| 3299 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 3300 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_fire_packetcxx . . $ Player_fire_packet.[slot].wb_indexcxx . . $ player_fire_packet#wb_index., data, &count); |
| 3301 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_fire_packetcxx . . $ Player_fire_packet.[slot].fire_maskcxx . . $ player_fire_packet#fire_mask., data, &count); |
| 3302 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_fire_packetcxx . . $ Player_fire_packet.[slot].damage_scalarcxx . . $ player_fire_packet#damage_scalar., data, &count); |
| 3303 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_fire_packetcxx . . $ Player_fire_packet.[slot].reliablecxx . . $ player_fire_packet#reliable., data, &count); |
| 3304 |
|
| 3305 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 3306 |
|
| 3307 |
return count; |
| 3308 |
} |
| 3309 |
|
| 3310 |
// Returns true if there is enough ammo to allow this player to fire, else false |
| 3311 |
bool MultiEnoughAmmoToFirecxx . . $ MultiEnoughAmmoToFire(cf9ef193275fa6d8).(int slot, int wb_index) { |
| 3312 |
shipcxx . . $ ship# *ship = &Shipscxx . . $ Ships.[Playerscxx . . $ Players.[slot].ship_indexcxx . . $ player#ship_index.]; |
| 3313 |
otype_wb_infocxx . . $ otype_wb_info# *wb = &ship->static_wbcxx . . $ ship#static_wb.[wb_index]; |
| 3314 |
|
| 3315 |
if (wb->ammo_usagecxx . . $ otype_wb_info#ammo_usage. > 0 && Playerscxx . . $ Players.[slot].weapon_ammocxx . . $ player#weapon_ammo.[wb_index] <= 0) |
| 3316 |
return false; |
| 3317 |
|
| 3318 |
return true; |
| 3319 |
} |
| 3320 |
|
| 3321 |
void MultiSubtractAmmoToFirecxx . . $ MultiSubtractAmmoToFire(3e454b8ccf442868).(int slot, int wb_index) { |
| 3322 |
shipcxx . . $ ship# *ship = &Shipscxx . . $ Ships.[Playerscxx . . $ Players.[slot].ship_indexcxx . . $ player#ship_index.]; |
| 3323 |
otype_wb_infocxx . . $ otype_wb_info# *wb = &ship->static_wbcxx . . $ ship#static_wb.[wb_index]; |
| 3324 |
Playerscxx . . $ Players.[slot].weapon_ammocxx . . $ player#weapon_ammo.[wb_index] -= wb->ammo_usagecxx . . $ otype_wb_info#ammo_usage.; |
| 3325 |
if (Playerscxx . . $ Players.[slot].weapon_ammocxx . . $ player#weapon_ammo.[wb_index] < 0) |
| 3326 |
Playerscxx . . $ Players.[slot].weapon_ammocxx . . $ player#weapon_ammo.[wb_index] = 0; |
| 3327 |
} |
| 3328 |
|
| 3329 |
#define MPFF_QUADEDcxx . . $ `Descent3/multi.cpp:3329:9`! 128 |
| 3330 |
// Sends a fire packet from a player |
| 3331 |
void MultiSendFirePlayerWBcxx . . $ MultiSendFirePlayerWB(1ddd52152094ffbc).(int playernum, uint8_tcxx . . $ uint8_t# wb_index, uint8_tcxx . . $ uint8_t# fire_mask, uint8_tcxx . . $ uint8_t# reliable, float scalar) { |
| 3332 |
// Send quaded info if needed |
| 3333 |
uint8_tcxx . . $ uint8_t# index_to_send = wb_index; |
| 3334 |
|
| 3335 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[playernum].objnumcxx . . $ player#objnum.].dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].flagscxx . . $ dynamic_wb_info#flags. & DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!) |
| 3336 |
index_to_send |= MPFF_QUADEDcxx . . $ `Descent3/multi.cpp:3329:9`!; |
| 3337 |
|
| 3338 |
uint8_tcxx . . $ uint8_t# damage_scalar = (scalar * 64.0); |
| 3339 |
|
| 3340 |
Player_fire_packetcxx . . $ Player_fire_packet.[playernum].fire_maskcxx . . $ player_fire_packet#fire_mask. = fire_mask; |
| 3341 |
Player_fire_packetcxx . . $ Player_fire_packet.[playernum].damage_scalarcxx . . $ player_fire_packet#damage_scalar. = damage_scalar; |
| 3342 |
Player_fire_packetcxx . . $ Player_fire_packet.[playernum].wb_indexcxx . . $ player_fire_packet#wb_index. = index_to_send; |
| 3343 |
Player_fire_packetcxx . . $ Player_fire_packet.[playernum].reliablecxx . . $ player_fire_packet#reliable. = reliable; |
| 3344 |
|
| 3345 |
// How should we send this information? |
| 3346 |
// secondary fire in a non-peer to peer game should get sent reliably |
| 3347 |
// except for a flage |
| 3348 |
#ifdef RELIABLE_SECONDARIES |
| 3349 |
if ((!(Netgame.flags & NF_PEER_PEER)) && (wb_index >= SECONDARY_INDEX) && (wb_index != FLARE_INDEX)) { |
| 3350 |
Player_fire_packet[playernum].fired_on_this_frame = PFP_FIRED_RELIABLE; |
| 3351 |
} else |
| 3352 |
#endif |
| 3353 |
{ |
| 3354 |
// send like normal fire |
| 3355 |
Player_fire_packetcxx . . $ Player_fire_packet.[playernum].fired_on_this_framecxx . . $ player_fire_packet#fired_on_this_frame. = PFP_FIREDcxx . . $ `Descent3/multi.h:660:9`!; |
| 3356 |
} |
| 3357 |
} |
| 3358 |
|
| 3359 |
// Does player firing |
| 3360 |
void MultiDoFirePlayerWBcxx . . $ MultiDoFirePlayerWB(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3361 |
int count = 0, ok_to_fire = 1; |
| 3362 |
|
| 3363 |
// Skip header stuff |
| 3364 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3365 |
|
| 3366 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3367 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3368 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].fire_maskcxx . . $ player_fire_packet#fire_mask. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3369 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].damage_scalarcxx . . $ player_fire_packet#damage_scalar. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3370 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].reliablecxx . . $ player_fire_packet#reliable. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3371 |
|
| 3372 |
// Strip out quad data |
| 3373 |
int wb_index = Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index.; |
| 3374 |
int quaded = wb_index & MPFF_QUADEDcxx . . $ `Descent3/multi.cpp:3329:9`!; |
| 3375 |
wb_index &= ~MPFF_QUADEDcxx . . $ `Descent3/multi.cpp:3329:9`!; |
| 3376 |
|
| 3377 |
// Fire! |
| 3378 |
float scalar = (float)Player_fire_packetcxx . . $ Player_fire_packet.[pnum].damage_scalarcxx . . $ player_fire_packet#damage_scalar. / 64.0; |
| 3379 |
int ship_index = Playerscxx . . $ Players.[pnum].ship_indexcxx . . $ player#ship_index.; |
| 3380 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.].dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].cur_firing_maskcxx . . $ dynamic_wb_info#cur_firing_mask. = Player_fire_packetcxx . . $ Player_fire_packet.[pnum].fire_maskcxx . . $ player_fire_packet#fire_mask.; |
| 3381 |
|
| 3382 |
if (quaded) |
| 3383 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.].dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].flagscxx . . $ dynamic_wb_info#flags. |= DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!; |
| 3384 |
else |
| 3385 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.].dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].flagscxx . . $ dynamic_wb_info#flags. &= ~DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!; |
| 3386 |
|
| 3387 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3388 |
// Check to see if this player is firing a weapon he doesn't have |
| 3389 |
playercxx . . $ player# *playp = &Playerscxx . . $ Players.[pnum]; |
| 3390 |
if (!(playp->weapon_flagscxx . . $ player#weapon_flags. & (1 << wb_index))) { |
| 3391 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Can't fire client weapon...flags=%d wb_index=%d\n", playp->weapon_flags, wb_index); |
| 3392 |
ok_to_fire = 0; |
| 3393 |
} |
| 3394 |
|
| 3395 |
if (!MultiEnoughAmmoToFirecxx . . $ MultiEnoughAmmoToFire(cf9ef193275fa6d8).(pnum, wb_index)) |
| 3396 |
ok_to_fire = 0; |
| 3397 |
} |
| 3398 |
|
| 3399 |
if (ok_to_fire) { |
| 3400 |
WBFireBatterycxx . . $ WBFireBattery(721350389efbb479).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.], &Shipscxx . . $ Ships.[ship_index].static_wbcxx . . $ ship#static_wb.[wb_index], 0, wb_index, scalar); |
| 3401 |
// Take off ammo |
| 3402 |
MultiSubtractAmmoToFirecxx . . $ MultiSubtractAmmoToFire(3e454b8ccf442868).(pnum, wb_index); |
| 3403 |
} |
| 3404 |
|
| 3405 |
// Play cutoff sound if there is one |
| 3406 |
int cutoff_sound = Shipscxx . . $ Ships.[ship_index].firing_release_soundcxx . . $ ship#firing_release_sound.[wb_index]; |
| 3407 |
if (cutoff_sound != -1) |
| 3408 |
Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(7fd84bfdbf757f76).(cutoff_sound, &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.]); |
| 3409 |
|
| 3410 |
if ((Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && ok_to_fire) && |
| 3411 |
((!(Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!)) || ((Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!) && Player_fire_packetcxx . . $ Player_fire_packet.[pnum].reliablecxx . . $ player_fire_packet#reliable.))) { |
| 3412 |
#ifdef RELIABLE_SECONDARIES |
| 3413 |
// How should we send this information? |
| 3414 |
// secondary fire in a non-peer to peer game should get sent reliably |
| 3415 |
if ((!(Netgame.flags & NF_PEER_PEER)) && (wb_index >= SECONDARY_INDEX) && (wb_index != FLARE_INDEX)) { |
| 3416 |
Player_fire_packet[pnum].fired_on_this_frame = PFP_FIRED_RELIABLE; |
| 3417 |
} else |
| 3418 |
#endif |
| 3419 |
{ |
| 3420 |
// send like normal fire |
| 3421 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].fired_on_this_framecxx . . $ player_fire_packet#fired_on_this_frame. = PFP_FIREDcxx . . $ `Descent3/multi.h:660:9`!; |
| 3422 |
} |
| 3423 |
} |
| 3424 |
} |
| 3425 |
|
| 3426 |
// Tell everyone I'm quitting |
| 3427 |
void MultiSendLeaveGamecxx . . $ MultiSendLeaveGame(49f6e7a06ebc5aa8).() { |
| 3428 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 3429 |
int count = 0; |
| 3430 |
int size_offset; |
| 3431 |
|
| 3432 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending leave game!\n"); |
| 3433 |
|
| 3434 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3435 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_SERVER_QUITcxx . . $ `Descent3/multi.h:536:9`!, data, &count, 1); |
| 3436 |
|
| 3437 |
ShowProgressScreencxx . . $ ShowProgressScreen(8d00172ec7558ddf).(TXT_MLTSHUTDOWNcxx . . $ `Descent3/stringtable.h:177:9`!); |
| 3438 |
|
| 3439 |
} else { |
| 3440 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_LEAVE_GAMEcxx . . $ `Descent3/multi.h:537:9`!, data, &count); |
| 3441 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 3442 |
} |
| 3443 |
|
| 3444 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 3445 |
|
| 3446 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3447 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_REQUEST_BUILDINGScxx . . $ `Descent3/multi_external.h:155:9`!); |
| 3448 |
} else { |
| 3449 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 3450 |
} |
| 3451 |
} |
| 3452 |
|
| 3453 |
// Called whenever I want to leave the game |
| 3454 |
void MultiLeaveGamecxx . . $ MultiLeaveGame(49f6e7a06ebc5aa8).() { |
| 3455 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "I'm leaving the netgame!\n"); |
| 3456 |
|
| 3457 |
CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(EVT_GAME_DISCONNECTEDcxx . . $ `lib/d3events.h:120:9`!, &DLLInfocxx . . $ DLLInfo.); |
| 3458 |
|
| 3459 |
if ((Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. & PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`!) || (Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].flagscxx . . $ player#flags. & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!)) |
| 3460 |
EndPlayerDeathcxx . . $ EndPlayerDeath(d4f767463ce0a6b3).(Player_numcxx . . $ Player_num.); |
| 3461 |
|
| 3462 |
// Cancel all incoming file transfers |
| 3463 |
|
| 3464 |
Multi_bail_ui_menucxx . . $ Multi_bail_ui_menu. = true; |
| 3465 |
MultiSendLeaveGamecxx . . $ MultiSendLeaveGame(49f6e7a06ebc5aa8).(); |
| 3466 |
|
| 3467 |
CallMultiDLLcxx . . $ CallMultiDLL(d4f767463ce0a6b3).(MT_EVT_GAME_OVERcxx . . $ `Descent3/multi_dll_mgr.h:91:9`!); |
| 3468 |
MultiCloseGamecxx . . $ MultiCloseGame(49f6e7a06ebc5aa8).(); |
| 3469 |
|
| 3470 |
SetFunctionModecxx . . $ SetFunctionMode(63b1daf7e687142b).(MENU_MODEcxx . . $ MENU_MODE.); |
| 3471 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3472 |
// gspy_EndGame(); |
| 3473 |
} |
| 3474 |
|
| 3475 |
ScoreAPIGameOvercxx . . $ ScoreAPIGameOver(49f6e7a06ebc5aa8).(); |
| 3476 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].flagscxx . . $ netplayer#flags. &= ~NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 3477 |
} |
| 3478 |
|
| 3479 |
// Releases a missile that belongs to a player |
| 3480 |
void MultiDoReleaseTimeoutMissilecxx . . $ MultiDoReleaseTimeoutMissile(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3481 |
int count = 0; |
| 3482 |
|
| 3483 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3484 |
|
| 3485 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3486 |
|
| 3487 |
if (Playerscxx . . $ Players.[pnum].user_timeout_objcxx . . $ player#user_timeout_obj. != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) { |
| 3488 |
ReleaseUserTimeoutMissilecxx . . $ ReleaseUserTimeoutMissile(d4f767463ce0a6b3).(pnum); |
| 3489 |
} |
| 3490 |
|
| 3491 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 3492 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 3493 |
} |
| 3494 |
|
| 3495 |
// Tell everyone I'm timingout my timeout weapon |
| 3496 |
void MultiSendReleaseTimeoutMissilecxx . . $ MultiSendReleaseTimeoutMissile(49f6e7a06ebc5aa8).() { |
| 3497 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 3498 |
int count = 0; |
| 3499 |
int size_offset; |
| 3500 |
|
| 3501 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Players[Player_num].user_timeout_obj != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 3502 |
|
| 3503 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending timeout weapon packet!\n"); |
| 3504 |
|
| 3505 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_TIMEOUT_WEAPONcxx . . $ `Descent3/multi.h:616:9`!, data, &count); |
| 3506 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 3507 |
|
| 3508 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 3509 |
|
| 3510 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 3511 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_REQUEST_BUILDINGScxx . . $ `Descent3/multi_external.h:155:9`!); |
| 3512 |
else |
| 3513 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 3514 |
} |
| 3515 |
|
| 3516 |
// Tells all the clients who are trying to join to piss off until the next level |
| 3517 |
void MultiSendConnectBailcxx . . $ MultiSendConnectBail(49f6e7a06ebc5aa8).() { |
| 3518 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 3519 |
int count = 0; |
| 3520 |
int size_offset; |
| 3521 |
bool wait_to_send = false; |
| 3522 |
int i; |
| 3523 |
|
| 3524 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_CONNECT_BAILcxx . . $ `Descent3/multi.h:625:9`!, data, &count); |
| 3525 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 3526 |
|
| 3527 |
// Tell them to stop trying to join |
| 3528 |
for (i = 1; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 3529 |
if (NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[i].sequencecxx . . $ netplayer#sequence. < NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!) { |
| 3530 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[i].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, true); |
| 3531 |
wait_to_send = true; |
| 3532 |
} |
| 3533 |
} |
| 3534 |
|
| 3535 |
// Make sure these clients get this |
| 3536 |
if (wait_to_send) { |
| 3537 |
for (int t = 0; t < 10; t++) { |
| 3538 |
nw_DoNetworkIdlecxx . . $ nw_DoNetworkIdle(49f6e7a06ebc5aa8).(); |
| 3539 |
Sleepcxx . . $ Sleep(d4f767463ce0a6b3).(100); |
| 3540 |
} |
| 3541 |
} |
| 3542 |
|
| 3543 |
// Now disconnect them |
| 3544 |
for (i = 1; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 3545 |
if (NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[i].sequencecxx . . $ netplayer#sequence. < NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!) { |
| 3546 |
nw_CloseSocketcxx . . $ nw_CloseSocket(11b0e290e57a7e53).(&NetPlayerscxx . . $ NetPlayers.[i].reliable_socketcxx . . $ netplayer#reliable_socket.); |
| 3547 |
NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. &= ~NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 3548 |
} |
| 3549 |
} |
| 3550 |
} |
| 3551 |
// Server is telling us to bail on our connection |
| 3552 |
void MultiDoConnectBailcxx . . $ MultiDoConnectBail(49f6e7a06ebc5aa8).() { |
| 3553 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) |
| 3554 |
return; |
| 3555 |
|
| 3556 |
ShowProgressScreencxx . . $ ShowProgressScreen(8d00172ec7558ddf).(TXT_MULTI_SERVERCHANGEAcxx . . $ `Descent3/stringtable.h:608:9`!, TXT_MULTI_SERVERCHANGEBcxx . . $ `Descent3/stringtable.h:609:9`!); |
| 3557 |
Sleepcxx . . $ Sleep(d4f767463ce0a6b3).(3000); |
| 3558 |
MultiLeaveGamecxx . . $ MultiLeaveGame(49f6e7a06ebc5aa8).(); |
| 3559 |
SetFunctionModecxx . . $ SetFunctionMode(63b1daf7e687142b).(MENU_MODEcxx . . $ MENU_MODE.); |
| 3560 |
} |
| 3561 |
|
| 3562 |
// Some DLL is telling us to end the level! |
| 3563 |
void MultiEndLevelcxx . . $ MultiEndLevel(49f6e7a06ebc5aa8).() { |
| 3564 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 3565 |
SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND.); |
| 3566 |
PrintDedicatedMessagecxx . . $ PrintDedicatedMessage(326aeb464d16410c).(TXT_DS_ENDINGLEVELcxx . . $ `Descent3/stringtable.h:610:9`!); |
| 3567 |
Multi_bail_ui_menucxx . . $ Multi_bail_ui_menu. = true; |
| 3568 |
} |
| 3569 |
|
| 3570 |
// server is telling us the level has ended |
| 3571 |
void MultiDoLevelEndedcxx . . $ MultiDoLevelEnded(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3572 |
int count = 0; |
| 3573 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3574 |
|
| 3575 |
int success = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3576 |
Multi_next_levelcxx . . $ Multi_next_level. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3577 |
|
| 3578 |
// Make sure we're not being fooled |
| 3579 |
if (Multi_next_levelcxx . . $ Multi_next_level. < 1 || Multi_next_levelcxx . . $ Multi_next_level. > Current_missioncxx . . $ Current_mission..num_levelscxx . . $ tMission#num_levels.) |
| 3580 |
Multi_next_levelcxx . . $ Multi_next_level. = -1; |
| 3581 |
|
| 3582 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Doing level ended! Next level=%d\n", Multi_next_level); |
| 3583 |
|
| 3584 |
if (success) |
| 3585 |
SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND.); |
| 3586 |
else |
| 3587 |
SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLFAILEDcxx . . $ GAMESTATE_LVLFAILED.); |
| 3588 |
|
| 3589 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. = NETSEQ_LEVEL_ENDcxx . . $ `Descent3/multi_external.h:162:9`!; |
| 3590 |
|
| 3591 |
Multi_bail_ui_menucxx . . $ Multi_bail_ui_menu. = true; |
| 3592 |
|
| 3593 |
CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(EVT_CLIENT_GAMELEVELENDcxx . . $ `lib/d3events.h:108:9`!, &DLLInfocxx . . $ DLLInfo.); |
| 3594 |
CallMultiDLLcxx . . $ CallMultiDLL(d4f767463ce0a6b3).(MT_EVT_GAME_OVERcxx . . $ `Descent3/multi_dll_mgr.h:91:9`!); |
| 3595 |
ScoreAPIGameOvercxx . . $ ScoreAPIGameOver(49f6e7a06ebc5aa8).(); |
| 3596 |
} |
| 3597 |
|
| 3598 |
// Tells all the clients to end the level |
| 3599 |
void MultiSendLevelEndedcxx . . $ MultiSendLevelEnded(3e454b8ccf442868).(int success, int next_level) { |
| 3600 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 3601 |
|
| 3602 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 3603 |
int count = 0; |
| 3604 |
int size_offset; |
| 3605 |
|
| 3606 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending level ended!\n"); |
| 3607 |
|
| 3608 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_LEVEL_ENDEDcxx . . $ `Descent3/multi.h:560:9`!, data, &count, 1); |
| 3609 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(success, data, &count); |
| 3610 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(next_level, data, &count); |
| 3611 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 3612 |
|
| 3613 |
// First send out to all the people who are playing |
| 3614 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, true); |
| 3615 |
|
| 3616 |
// Now send a connect bail on all the ones who are connecting |
| 3617 |
MultiSendConnectBailcxx . . $ MultiSendConnectBail(49f6e7a06ebc5aa8).(); |
| 3618 |
|
| 3619 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. = NETSEQ_LEVEL_ENDcxx . . $ `Descent3/multi_external.h:162:9`!; |
| 3620 |
|
| 3621 |
if (success) |
| 3622 |
SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLENDcxx . . $ GAMESTATE_LVLEND.); |
| 3623 |
else |
| 3624 |
SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLFAILEDcxx . . $ GAMESTATE_LVLFAILED.); |
| 3625 |
|
| 3626 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3627 |
for (int i = 0; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 3628 |
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`!) |
| 3629 |
NetPlayerscxx . . $ NetPlayers.[i].sequencecxx . . $ netplayer#sequence. = NETSEQ_WAITING_FOR_LEVELcxx . . $ `Descent3/multi_external.h:149:9`!; |
| 3630 |
} |
| 3631 |
} |
| 3632 |
// Do this so it gets sent off now. |
| 3633 |
for (int t = 0; t < 10; t++) { |
| 3634 |
nw_DoNetworkIdlecxx . . $ nw_DoNetworkIdle(49f6e7a06ebc5aa8).(); |
| 3635 |
Sleepcxx . . $ Sleep(d4f767463ce0a6b3).(100); |
| 3636 |
} |
| 3637 |
} |
| 3638 |
|
| 3639 |
extern void MultiClearPlayerMarkerscxx . . $ MultiClearPlayerMarkers(d4f767463ce0a6b3).(int slot); |
| 3640 |
// Do leave game stuff |
| 3641 |
void MultiDoLeaveGamecxx . . $ MultiDoLeaveGame(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3642 |
int count = 0; |
| 3643 |
|
| 3644 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "In MultiDoLeaveGame!\n"); |
| 3645 |
|
| 3646 |
// Skip header stuff |
| 3647 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3648 |
|
| 3649 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3650 |
|
| 3651 |
if (NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) { |
| 3652 |
if (NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) { |
| 3653 |
AddHUDMessagecxx . . $ AddHUDMessage(f90d95ab21fd6d97).(TXT_MLTLEAVEGAMEcxx . . $ `Descent3/stringtable.h:178:9`!, Playerscxx . . $ Players.[slot].callsigncxx . . $ player#callsign.); |
| 3654 |
MultiMakePlayerGhostcxx . . $ MultiMakePlayerGhost(d4f767463ce0a6b3).(slot); |
| 3655 |
Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. = 0; |
| 3656 |
} |
| 3657 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. &= ~NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 3658 |
NetPlayerscxx . . $ NetPlayers.[slot].secret_net_idcxx . . $ netplayer#secret_net_id. = 0; |
| 3659 |
} else |
| 3660 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a leave game from a non-connected player!\n"); |
| 3661 |
|
| 3662 |
// Now clear any files this guy might be receiving |
| 3663 |
if (NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. != NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!) { |
| 3664 |
if (NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.) { |
| 3665 |
char delfile[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 3666 |
strcpy(delfile, NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.->namecxx . . $ CFILE#name.); |
| 3667 |
cfclosecxx . . $ cfclose(3639e799710acb68).(NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 3668 |
NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 3669 |
if (NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. == NETFILE_RECEIVINGcxx . . $ `Descent3/multi.h:685:9`!) |
| 3670 |
ddio_DeleteFilecxx . . $ ddio_DeleteFile(5c4306d8553b3696).(delfile); |
| 3671 |
} |
| 3672 |
NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!; |
| 3673 |
NetPlayerscxx . . $ NetPlayers.[slot].custom_file_seqcxx . . $ netplayer#custom_file_seq.++; |
| 3674 |
NetPlayerscxx . . $ NetPlayers.[slot].custom_file_seqcxx . . $ netplayer#custom_file_seq. = NETFILE_ID_NOFILEcxx . . $ `Descent3/multi.h:688:9`!; |
| 3675 |
} |
| 3676 |
|
| 3677 |
// If this is the server, do any cleanup on this slot |
| 3678 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3679 |
MultiClearGuidebotcxx . . $ MultiClearGuidebot(d4f767463ce0a6b3).(slot); |
| 3680 |
MultiClearPlayerMarkerscxx . . $ MultiClearPlayerMarkers(d4f767463ce0a6b3).(slot); |
| 3681 |
DLLInfocxx . . $ DLLInfo..me_handlecxx . . $ dllinfo#me_handle. = DLLInfocxx . . $ DLLInfo..it_handlecxx . . $ dllinfo#it_handle. = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 3682 |
CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(EVT_GAMEPLAYERDISCONNECTcxx . . $ `lib/d3events.h:71:9`!, &DLLInfocxx . . $ DLLInfo.); |
| 3683 |
|
| 3684 |
if (NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) |
| 3685 |
PlayerSpewInventorycxx . . $ PlayerSpewInventory(80a724877f6428f2).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.], true, true); |
| 3686 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(slot, data, count, NETSEQ_REQUEST_BUILDINGScxx . . $ `Descent3/multi_external.h:155:9`!); |
| 3687 |
if (NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. != NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!) { |
| 3688 |
MultiCancelFilecxx . . $ MultiCancelFile(b1146eedae1e1d0b).(slot, NetPlayerscxx . . $ NetPlayers.[slot].custom_file_seqcxx . . $ netplayer#custom_file_seq., NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_whocxx . . $ netplayer#file_xfer_who.); |
| 3689 |
} |
| 3690 |
nw_CloseSocketcxx . . $ nw_CloseSocket(11b0e290e57a7e53).(&NetPlayerscxx . . $ NetPlayers.[slot].reliable_socketcxx . . $ netplayer#reliable_socket.); |
| 3691 |
if (Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game.) { |
| 3692 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. |= NPF_MT_WRITING_PILOTcxx . . $ `Descent3/multi_external.h:169:9`!; |
| 3693 |
} |
| 3694 |
} |
| 3695 |
ScoreAPIPlayerLeftcxx . . $ ScoreAPIPlayerLeft(d4f767463ce0a6b3).(slot); |
| 3696 |
} |
| 3697 |
|
| 3698 |
void MultiDoServerQuitcxx . . $ MultiDoServerQuit(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3699 |
ShowProgressScreencxx . . $ ShowProgressScreen(8d00172ec7558ddf).(TXT_MLTSERVERQUITcxx . . $ `Descent3/stringtable.h:179:9`!); |
| 3700 |
// Abort all file transfers |
| 3701 |
// ddio_DeleteFile(NetPlayers[filewho].file_xfer_cfile->name); |
| 3702 |
for (int i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 3703 |
if (NetPlayerscxx . . $ NetPlayers.[i].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. != NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!) { |
| 3704 |
if (NetPlayerscxx . . $ NetPlayers.[i].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.) { |
| 3705 |
char delfile[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 3706 |
strcpy(delfile, NetPlayerscxx . . $ NetPlayers.[i].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.->namecxx . . $ CFILE#name.); |
| 3707 |
cfclosecxx . . $ cfclose(3639e799710acb68).(NetPlayerscxx . . $ NetPlayers.[i].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 3708 |
NetPlayerscxx . . $ NetPlayers.[i].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 3709 |
if (NetPlayerscxx . . $ NetPlayers.[i].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. == NETFILE_RECEIVINGcxx . . $ `Descent3/multi.h:685:9`!) |
| 3710 |
ddio_DeleteFilecxx . . $ ddio_DeleteFile(5c4306d8553b3696).(delfile); |
| 3711 |
} |
| 3712 |
NetPlayerscxx . . $ NetPlayers.[i].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!; |
| 3713 |
NetPlayerscxx . . $ NetPlayers.[i].custom_file_seqcxx . . $ netplayer#custom_file_seq.++; |
| 3714 |
NetPlayerscxx . . $ NetPlayers.[i].custom_file_seqcxx . . $ netplayer#custom_file_seq. = NETFILE_ID_NOFILEcxx . . $ `Descent3/multi.h:688:9`!; |
| 3715 |
} |
| 3716 |
} |
| 3717 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server quitting!\n"); |
| 3718 |
MultiLeaveGamecxx . . $ MultiLeaveGame(49f6e7a06ebc5aa8).(); |
| 3719 |
Sleepcxx . . $ Sleep(d4f767463ce0a6b3).(2000); |
| 3720 |
} |
| 3721 |
|
| 3722 |
void MultiDoDisconnectcxx . . $ MultiDoDisconnect(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3723 |
int count = 0; |
| 3724 |
|
| 3725 |
// Skip header stuff |
| 3726 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3727 |
|
| 3728 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3729 |
|
| 3730 |
if (NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) { |
| 3731 |
if (NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. != NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!) { |
| 3732 |
if (NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.) { |
| 3733 |
char delfile[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 3734 |
strcpy(delfile, NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.->namecxx . . $ CFILE#name.); |
| 3735 |
cfclosecxx . . $ cfclose(3639e799710acb68).(NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 3736 |
NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 3737 |
if (NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. == NETFILE_RECEIVINGcxx . . $ `Descent3/multi.h:685:9`!) |
| 3738 |
ddio_DeleteFilecxx . . $ ddio_DeleteFile(5c4306d8553b3696).(delfile); |
| 3739 |
} |
| 3740 |
NetPlayerscxx . . $ NetPlayers.[slot].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!; |
| 3741 |
NetPlayerscxx . . $ NetPlayers.[slot].custom_file_seqcxx . . $ netplayer#custom_file_seq.++; |
| 3742 |
NetPlayerscxx . . $ NetPlayers.[slot].custom_file_seqcxx . . $ netplayer#custom_file_seq. = NETFILE_ID_NOFILEcxx . . $ `Descent3/multi.h:688:9`!; |
| 3743 |
} |
| 3744 |
if (NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) { |
| 3745 |
AddHUDMessagecxx . . $ AddHUDMessage(f90d95ab21fd6d97).(TXT_MLTDISCONNECTcxx . . $ `Descent3/stringtable.h:180:9`!, Playerscxx . . $ Players.[slot].callsigncxx . . $ player#callsign.); |
| 3746 |
MultiMakePlayerGhostcxx . . $ MultiMakePlayerGhost(d4f767463ce0a6b3).(slot); |
| 3747 |
} |
| 3748 |
NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. &= ~NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 3749 |
NetPlayerscxx . . $ NetPlayers.[slot].secret_net_idcxx . . $ netplayer#secret_net_id. = 0; |
| 3750 |
} else |
| 3751 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a disconnect from a non-connected player!\n"); |
| 3752 |
|
| 3753 |
ScoreAPIPlayerLeftcxx . . $ ScoreAPIPlayerLeft(d4f767463ce0a6b3).(slot); |
| 3754 |
} |
| 3755 |
|
| 3756 |
void MultiDoServerRejectedChecksumcxx . . $ MultiDoServerRejectedChecksum(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3757 |
int count = 0; |
| 3758 |
|
| 3759 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 3760 |
|
| 3761 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3762 |
ShowProgressScreencxx . . $ ShowProgressScreen(8d00172ec7558ddf).(TXT_MLTLEVELNOMATCHcxx . . $ `Descent3/stringtable.h:181:9`!); |
| 3763 |
MultiLeaveGamecxx . . $ MultiLeaveGame(49f6e7a06ebc5aa8).(); |
| 3764 |
Sleepcxx . . $ Sleep(d4f767463ce0a6b3).(2000); |
| 3765 |
} |
| 3766 |
|
| 3767 |
// Lets us know if the server says its ok to join |
| 3768 |
void MultiDoJoinResponsecxx . . $ MultiDoJoinResponse(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 3769 |
int count = 0; |
| 3770 |
|
| 3771 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 3772 |
|
| 3773 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3774 |
|
| 3775 |
Ok_to_joincxx . . $ Ok_to_join. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 3776 |
} |
| 3777 |
|
| 3778 |
// Returns an index of a unconnected slot |
| 3779 |
// Returns -1 if there are none |
| 3780 |
int MultiFindFreeSlotcxx . . $ MultiFindFreeSlot(b126dc7c1de90089).() { |
| 3781 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 3782 |
return -1; |
| 3783 |
} |
| 3784 |
|
| 3785 |
for (int i = 0; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 3786 |
if ((NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & (NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! | NPF_MT_READING_PILOTcxx . . $ `Descent3/multi_external.h:168:9`! | NPF_MT_WRITING_PILOTcxx . . $ `Descent3/multi_external.h:169:9`!)) == 0) |
| 3787 |
return i; |
| 3788 |
//(!(NetPlayers[i].flags & NPF_CONNECTED)) |
| 3789 |
} |
| 3790 |
|
| 3791 |
return -1; |
| 3792 |
} |
| 3793 |
|
| 3794 |
// Someone is asking to join our game |
| 3795 |
// Tell them if its ok |
| 3796 |
void MultiDoAskToJoincxx . . $ MultiDoAskToJoin(b4ed6bda213be74).(uint8_tcxx . . $ uint8_t# *data, network_addresscxx . . $ network_address# *from_addr) { |
| 3797 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 3798 |
int count = 0; |
| 3799 |
int incount = 0; |
| 3800 |
int size; |
| 3801 |
|
| 3802 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_JOIN_RESPONSEcxx . . $ `Descent3/multi.h:535:9`!, outdata, &count); |
| 3803 |
|
| 3804 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && Multi_accept_statecxx . . $ Multi_accept_state.) { |
| 3805 |
// First see if this guy is banned |
| 3806 |
if (GameDLLIsAddressBannedcxx . . $ GameDLLIsAddressBanned(46e1c72e52d9c94a).(from_addr, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!)) { |
| 3807 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(JOIN_ANSWER_REJECTEDcxx . . $ `Descent3/multi_server.h:44:9`!, outdata, &count); |
| 3808 |
|
| 3809 |
} else { |
| 3810 |
if (MultiCountPlayerscxx . . $ MultiCountPlayers(b126dc7c1de90089).() < Netgamecxx . . $ Netgame..max_playerscxx . . $ netgame_info#max_players.) { |
| 3811 |
int slot = MultiFindFreeSlotcxx . . $ MultiFindFreeSlot(b126dc7c1de90089).(); |
| 3812 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(slot > 0, "FindFreeSlot returned -1!"); |
| 3813 |
|
| 3814 |
if (Playerscxx . . $ Players.[slot].start_roomnumcxx . . $ player#start_roomnum. != -1) { |
| 3815 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending OK to join!\n"); |
| 3816 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(JOIN_ANSWER_OKcxx . . $ `Descent3/multi_server.h:42:9`!, outdata, &count); |
| 3817 |
} else { |
| 3818 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(JOIN_ANSWER_NO_ROOMcxx . . $ `Descent3/multi_server.h:45:9`!, outdata, &count); |
| 3819 |
} |
| 3820 |
} else { |
| 3821 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(JOIN_ANSWER_FULLcxx . . $ `Descent3/multi_server.h:46:9`!, outdata, &count); |
| 3822 |
} |
| 3823 |
} |
| 3824 |
} else |
| 3825 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(JOIN_ANSWER_NOT_SERVERcxx . . $ `Descent3/multi_server.h:43:9`!, outdata, &count); |
| 3826 |
|
| 3827 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 3828 |
|
| 3829 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(from_addr, outdata, count, 0); |
| 3830 |
} |
| 3831 |
|
| 3832 |
// Someone is asking about our game |
| 3833 |
void MultiDoGetGameInfocxx . . $ MultiDoGetGameInfo(b4ed6bda213be74).(uint8_tcxx . . $ uint8_t# *data, network_addresscxx . . $ network_address# *from_addr) { |
| 3834 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 3835 |
int count = 0; |
| 3836 |
int size_offset; |
| 3837 |
network_addresscxx . . $ network_address# my_addr; |
| 3838 |
float ping_time; |
| 3839 |
|
| 3840 |
// mprintf(0,"Got a request for knowledge about my game!\n"); |
| 3841 |
|
| 3842 |
// Get the time and stuff it back in the packet |
| 3843 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3844 |
ping_time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 3845 |
int version = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 3846 |
|
| 3847 |
if (version != MULTI_VERSIONcxx . . $ `Descent3/multi.h:517:9`!) |
| 3848 |
return; // Versions don't match, so just return |
| 3849 |
|
| 3850 |
count = 0; |
| 3851 |
|
| 3852 |
if (Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game.) |
| 3853 |
return; |
| 3854 |
|
| 3855 |
if (!Multi_accept_statecxx . . $ Multi_accept_state.) |
| 3856 |
return; |
| 3857 |
|
| 3858 |
if ((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`!)) { |
| 3859 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_GAME_INFOcxx . . $ `Descent3/multi.h:553:9`!, outdata, &count); |
| 3860 |
// Copies my address into the passed argument |
| 3861 |
nw_GetMyAddresscxx . . $ nw_GetMyAddress(f2758234d0c8cb80).(&my_addr); |
| 3862 |
memcpy(&outdata[count], &my_addr, sizeof(network_addresscxx . . $ network_address#)); |
| 3863 |
count += sizeof(network_addresscxx . . $ network_address#); |
| 3864 |
|
| 3865 |
int len = strlen(Netgamecxx . . $ Netgame..namecxx . . $ netgame_info#name.) + 1; |
| 3866 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, outdata, &count); |
| 3867 |
memcpy(&outdata[count], Netgamecxx . . $ Netgame..namecxx . . $ netgame_info#name., len); |
| 3868 |
count += len; |
| 3869 |
|
| 3870 |
len = strlen(Netgamecxx . . $ Netgame..missioncxx . . $ netgame_info#mission.) + 1; |
| 3871 |
|
| 3872 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, outdata, &count); |
| 3873 |
memcpy(&outdata[count], Netgamecxx . . $ Netgame..missioncxx . . $ netgame_info#mission., len); |
| 3874 |
count += len; |
| 3875 |
|
| 3876 |
len = strlen(Netgamecxx . . $ Netgame..mission_namecxx . . $ netgame_info#mission_name.) + 1; |
| 3877 |
|
| 3878 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, outdata, &count); |
| 3879 |
memcpy(&outdata[count], Netgamecxx . . $ Netgame..mission_namecxx . . $ netgame_info#mission_name., len); |
| 3880 |
count += len; |
| 3881 |
|
| 3882 |
len = strlen(Netgamecxx . . $ Netgame..scriptnamecxx . . $ netgame_info#scriptname.) + 1; |
| 3883 |
|
| 3884 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, outdata, &count); |
| 3885 |
memcpy(&outdata[count], Netgamecxx . . $ Netgame..scriptnamecxx . . $ netgame_info#scriptname., len); |
| 3886 |
count += len; |
| 3887 |
|
| 3888 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(Current_missioncxx . . $ Current_mission..cur_levelcxx . . $ tMission#cur_level., outdata, &count); |
| 3889 |
uint16_tcxx . . $ uint16_t# icurrplayers = 0; |
| 3890 |
for (int i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 3891 |
if (Dedicated_servercxx . . $ Dedicated_server.) { |
| 3892 |
if (i == Player_numcxx . . $ Player_num.) |
| 3893 |
continue; |
| 3894 |
} |
| 3895 |
if ((NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) && (Playerscxx . . $ Players.[i].callsigncxx . . $ player#callsign.[0])) |
| 3896 |
icurrplayers++; |
| 3897 |
} |
| 3898 |
// Adjust the players count because the server isn't a player |
| 3899 |
|
| 3900 |
int maxplayers = Netgamecxx . . $ Netgame..max_playerscxx . . $ netgame_info#max_players.; |
| 3901 |
if (Dedicated_servercxx . . $ Dedicated_server.) { |
| 3902 |
// icurrplayers--; |
| 3903 |
maxplayers--; |
| 3904 |
} |
| 3905 |
|
| 3906 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(icurrplayers, outdata, &count); |
| 3907 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(maxplayers, outdata, &count); |
| 3908 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(ping_time, outdata, &count); |
| 3909 |
|
| 3910 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags., outdata, &count); |
| 3911 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Dedicated_servercxx . . $ Dedicated_server. ? 1 : 0, outdata, &count); |
| 3912 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Netgamecxx . . $ Netgame..difficultycxx . . $ netgame_info#difficulty., outdata, &count); |
| 3913 |
|
| 3914 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size_offset); |
| 3915 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(from_addr, outdata, count, 0); |
| 3916 |
} |
| 3917 |
} |
| 3918 |
|
| 3919 |
// Someone is asking about our PXO game |
| 3920 |
void MultiDoGetPXOGameInfocxx . . $ MultiDoGetPXOGameInfo(b4ed6bda213be74).(uint8_tcxx . . $ uint8_t# *data, network_addresscxx . . $ network_address# *from_addr) { |
| 3921 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 3922 |
int count = 0; |
| 3923 |
int size_offset; |
| 3924 |
float ping_time; |
| 3925 |
network_addresscxx . . $ network_address# my_addr; |
| 3926 |
|
| 3927 |
// mprintf(0,"Got a request for knowledge about my game!\n"); |
| 3928 |
|
| 3929 |
if (!Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game.) { |
| 3930 |
return; |
| 3931 |
} |
| 3932 |
// Get the time and stuff it back in the packet |
| 3933 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 3934 |
ping_time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 3935 |
int version = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 3936 |
|
| 3937 |
if (version != MULTI_VERSIONcxx . . $ `Descent3/multi.h:517:9`!) |
| 3938 |
return; // Versions don't match, so just return |
| 3939 |
|
| 3940 |
count = 0; |
| 3941 |
|
| 3942 |
if ((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`!)) { |
| 3943 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_GAME_INFOcxx . . $ `Descent3/multi.h:553:9`!, outdata, &count); |
| 3944 |
// Copies my address into the passed argument |
| 3945 |
nw_GetMyAddresscxx . . $ nw_GetMyAddress(f2758234d0c8cb80).(&my_addr); |
| 3946 |
memcpy(&outdata[count], &my_addr, sizeof(network_addresscxx . . $ network_address#)); |
| 3947 |
count += sizeof(network_addresscxx . . $ network_address#); |
| 3948 |
|
| 3949 |
int len = strlen(Netgamecxx . . $ Netgame..namecxx . . $ netgame_info#name.) + 1; |
| 3950 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, outdata, &count); |
| 3951 |
memcpy(&outdata[count], Netgamecxx . . $ Netgame..namecxx . . $ netgame_info#name., len); |
| 3952 |
count += len; |
| 3953 |
|
| 3954 |
len = strlen(Netgamecxx . . $ Netgame..missioncxx . . $ netgame_info#mission.) + 1; |
| 3955 |
|
| 3956 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, outdata, &count); |
| 3957 |
memcpy(&outdata[count], Netgamecxx . . $ Netgame..missioncxx . . $ netgame_info#mission., len); |
| 3958 |
count += len; |
| 3959 |
|
| 3960 |
len = strlen(Netgamecxx . . $ Netgame..mission_namecxx . . $ netgame_info#mission_name.) + 1; |
| 3961 |
|
| 3962 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, outdata, &count); |
| 3963 |
memcpy(&outdata[count], Netgamecxx . . $ Netgame..mission_namecxx . . $ netgame_info#mission_name., len); |
| 3964 |
count += len; |
| 3965 |
|
| 3966 |
len = strlen(Netgamecxx . . $ Netgame..scriptnamecxx . . $ netgame_info#scriptname.) + 1; |
| 3967 |
|
| 3968 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, outdata, &count); |
| 3969 |
memcpy(&outdata[count], Netgamecxx . . $ Netgame..scriptnamecxx . . $ netgame_info#scriptname., len); |
| 3970 |
count += len; |
| 3971 |
|
| 3972 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(Current_missioncxx . . $ Current_mission..cur_levelcxx . . $ tMission#cur_level., outdata, &count); |
| 3973 |
uint16_tcxx . . $ uint16_t# icurrplayers = 0; |
| 3974 |
int i = 0; |
| 3975 |
|
| 3976 |
for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 3977 |
if (Dedicated_servercxx . . $ Dedicated_server.) { |
| 3978 |
if (i == Player_numcxx . . $ Player_num.) |
| 3979 |
continue; |
| 3980 |
} |
| 3981 |
if (NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) |
| 3982 |
icurrplayers++; |
| 3983 |
} |
| 3984 |
|
| 3985 |
// Adjust the players count because the server isn't a player |
| 3986 |
|
| 3987 |
int maxplayers = Netgamecxx . . $ Netgame..max_playerscxx . . $ netgame_info#max_players.; |
| 3988 |
if (Dedicated_servercxx . . $ Dedicated_server.) { |
| 3989 |
maxplayers--; |
| 3990 |
} |
| 3991 |
|
| 3992 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(icurrplayers, outdata, &count); |
| 3993 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(maxplayers, outdata, &count); |
| 3994 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(ping_time, outdata, &count); |
| 3995 |
|
| 3996 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags., outdata, &count); |
| 3997 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Dedicated_servercxx . . $ Dedicated_server. ? 1 : 0, outdata, &count); |
| 3998 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Netgamecxx . . $ Netgame..difficultycxx . . $ netgame_info#difficulty., outdata, &count); |
| 3999 |
|
| 4000 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size_offset); |
| 4001 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(from_addr, outdata, count, 0); |
| 4002 |
} |
| 4003 |
} |
| 4004 |
|
| 4005 |
bool Multi_Gamelist_changedcxx . . $ Multi_Gamelist_changed. = false; |
| 4006 |
|
| 4007 |
// A server is telling us about a game we've requested |
| 4008 |
void MultiDoGameInfocxx . . $ MultiDoGameInfo(b4ed6bda213be74).(uint8_tcxx . . $ uint8_t# *data, network_addresscxx . . $ network_address# *from_addr) { |
| 4009 |
int count = 0; |
| 4010 |
|
| 4011 |
char name[NETGAME_NAME_LENcxx . . $ `Descent3/multi_external.h:125:9`!]; |
| 4012 |
char mission[MSN_NAMELENcxx . . $ `Descent3/descent.h:181:9`!]; |
| 4013 |
char mission_name[MISSION_NAME_LENcxx . . $ `Descent3/multi_external.h:206:9`!]; |
| 4014 |
char scriptname[NETGAME_SCRIPT_LENcxx . . $ `Descent3/multi_external.h:126:9`!]; |
| 4015 |
int level; |
| 4016 |
int maxplayers; |
| 4017 |
int currplayers; |
| 4018 |
network_addresscxx . . $ network_address# incoming_addr; |
| 4019 |
int len, mission_len, script_len, mission_name_len; |
| 4020 |
float ping_time; |
| 4021 |
int i; |
| 4022 |
int fixed_len; |
| 4023 |
|
| 4024 |
if (Num_network_games_knowncxx . . $ Num_network_games_known. >= MAX_NETWORK_GAMEScxx . . $ `Descent3/multi.h:678:9`!) |
| 4025 |
return; |
| 4026 |
|
| 4027 |
// mprintf(0,"Got game info packet!!\n"); |
| 4028 |
|
| 4029 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4030 |
|
| 4031 |
// memcpy (&incoming_addr,&data[count],sizeof(network_address)); |
| 4032 |
// Get the network_address from the packet header, not the packet data |
| 4033 |
memcpy(&incoming_addr, from_addr, sizeof(network_addresscxx . . $ network_address#)); |
| 4034 |
count += sizeof(network_addresscxx . . $ network_address#); |
| 4035 |
|
| 4036 |
len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4037 |
|
| 4038 |
fixed_len = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(NETGAME_NAME_LENcxx . . $ `Descent3/multi_external.h:125:9`!, len); |
| 4039 |
|
| 4040 |
memcpy(name, &data[count], fixed_len); |
| 4041 |
name[fixed_len - 1] = 0; |
| 4042 |
count += len; |
| 4043 |
|
| 4044 |
mission_len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4045 |
|
| 4046 |
fixed_len = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(MSN_NAMELENcxx . . $ `Descent3/descent.h:181:9`!, mission_len); |
| 4047 |
|
| 4048 |
memcpy(mission, &data[count], fixed_len); |
| 4049 |
mission[fixed_len - 1] = 0; |
| 4050 |
count += mission_len; |
| 4051 |
|
| 4052 |
mission_name_len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4053 |
|
| 4054 |
fixed_len = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(MISSION_NAME_LENcxx . . $ `Descent3/multi_external.h:206:9`!, mission_name_len); |
| 4055 |
|
| 4056 |
memcpy(mission_name, &data[count], fixed_len); |
| 4057 |
mission_name[fixed_len - 1] = 0; |
| 4058 |
count += mission_name_len; |
| 4059 |
|
| 4060 |
script_len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4061 |
|
| 4062 |
fixed_len = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(NETGAME_SCRIPT_LENcxx . . $ `Descent3/multi_external.h:126:9`!, script_len); |
| 4063 |
|
| 4064 |
memcpy(scriptname, &data[count], fixed_len); |
| 4065 |
scriptname[fixed_len - 1] = 0; |
| 4066 |
count += script_len; |
| 4067 |
|
| 4068 |
level = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4069 |
currplayers = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4070 |
maxplayers = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4071 |
|
| 4072 |
ping_time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4073 |
|
| 4074 |
uint32_tcxx . . $ uint32_t# flags = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 4075 |
bool dedicated = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count) ? true : false; |
| 4076 |
|
| 4077 |
int diff = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4078 |
|
| 4079 |
// Now go through and see if this is game we don't already have in our list |
| 4080 |
for (i = 0; i < Num_network_games_knowncxx . . $ Num_network_games_known.; i++) { |
| 4081 |
if ((!memcmp(&incoming_addr, &Network_gamescxx . . $ Network_games.[i].addrcxx . . $ network_game#addr., sizeof(network_addresscxx . . $ network_address#)))) { |
| 4082 |
Multi_Gamelist_changedcxx . . $ Multi_Gamelist_changed. = true; |
| 4083 |
Network_gamescxx . . $ Network_games.[i].server_response_timecxx . . $ network_game#server_response_time. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - ping_time; |
| 4084 |
Network_gamescxx . . $ Network_games.[i].last_updatecxx . . $ network_game#last_update. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 4085 |
Network_gamescxx . . $ Network_games.[i].level_numcxx . . $ network_game#level_num. = level; |
| 4086 |
Network_gamescxx . . $ Network_games.[i].curr_num_playerscxx . . $ network_game#curr_num_players. = currplayers; |
| 4087 |
return; |
| 4088 |
} |
| 4089 |
} |
| 4090 |
|
| 4091 |
if (i == Num_network_games_knowncxx . . $ Num_network_games_known.) { |
| 4092 |
Multi_Gamelist_changedcxx . . $ Multi_Gamelist_changed. = true; |
| 4093 |
// We found a new one! |
| 4094 |
int n = Num_network_games_knowncxx . . $ Num_network_games_known.; |
| 4095 |
Network_gamescxx . . $ Network_games.[n].last_updatecxx . . $ network_game#last_update. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 4096 |
memcpy(&Network_gamescxx . . $ Network_games.[n].addrcxx . . $ network_game#addr., &incoming_addr, sizeof(network_addresscxx . . $ network_address#)); |
| 4097 |
strcpy(Network_gamescxx . . $ Network_games.[n].namecxx . . $ network_game#name., name); |
| 4098 |
strcpy(Network_gamescxx . . $ Network_games.[n].missioncxx . . $ network_game#mission., mission); |
| 4099 |
strcpy(Network_gamescxx . . $ Network_games.[n].mission_namecxx . . $ network_game#mission_name., mission_name); |
| 4100 |
strcpy(Network_gamescxx . . $ Network_games.[n].scriptnamecxx . . $ network_game#scriptname., scriptname); |
| 4101 |
Network_gamescxx . . $ Network_games.[n].level_numcxx . . $ network_game#level_num. = level; |
| 4102 |
Network_gamescxx . . $ Network_games.[n].curr_num_playerscxx . . $ network_game#curr_num_players. = currplayers; |
| 4103 |
Network_gamescxx . . $ Network_games.[n].max_num_playerscxx . . $ network_game#max_num_players. = maxplayers; |
| 4104 |
Network_gamescxx . . $ Network_games.[n].server_response_timecxx . . $ network_game#server_response_time. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - ping_time; |
| 4105 |
Network_gamescxx . . $ Network_games.[n].flagscxx . . $ network_game#flags. = flags; |
| 4106 |
Network_gamescxx . . $ Network_games.[n].dedicated_servercxx . . $ network_game#dedicated_server. = dedicated; |
| 4107 |
Network_gamescxx . . $ Network_games.[n].difficultycxx . . $ network_game#difficulty. = diff; |
| 4108 |
// This handle is used to make the game list update nicely |
| 4109 |
Network_gamescxx . . $ Network_games.[n].handlecxx . . $ network_game#handle. = Netgame_curr_handlecxx . . $ Netgame_curr_handle.++; |
| 4110 |
// mprintf(0,"Got new game called %s!\n",name); |
| 4111 |
|
| 4112 |
Num_network_games_knowncxx . . $ Num_network_games_known.++; |
| 4113 |
|
| 4114 |
} else |
| 4115 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // How'd we get here? |
| 4116 |
} |
| 4117 |
|
| 4118 |
// Tells our clients that building exploded |
| 4119 |
// Server only |
| 4120 |
void MultiSendBlowupBuildingcxx . . $ MultiSendBlowupBuilding(c2f439e40e2f19ed).(int hit_objnum, int killer_objnum, float damage) { |
| 4121 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, "Client in SendBlowupBuilding!"); |
| 4122 |
|
| 4123 |
int count = 0; |
| 4124 |
int size_offset = 0; |
| 4125 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 4126 |
|
| 4127 |
uint16_tcxx . . $ uint16_t# short_damage = damage; |
| 4128 |
|
| 4129 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_BLOWUP_BUILDINGcxx . . $ `Descent3/multi.h:538:9`!, data, &count, 1); |
| 4130 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(hit_objnum, data, &count); |
| 4131 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(killer_objnum, data, &count); |
| 4132 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(damage, data, &count); |
| 4133 |
|
| 4134 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 4135 |
|
| 4136 |
if (!Multi_building_statescxx . . $ Multi_building_states.[hit_objnum]) { |
| 4137 |
Multi_building_statescxx . . $ Multi_building_states.[hit_objnum] = 1; |
| 4138 |
Multi_num_buildings_changedcxx . . $ Multi_num_buildings_changed.++; |
| 4139 |
} |
| 4140 |
|
| 4141 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_REQUEST_OBJECTScxx . . $ `Descent3/multi_external.h:157:9`!); |
| 4142 |
} |
| 4143 |
|
| 4144 |
// Blowup a building because the server told us so |
| 4145 |
void MultiDoBlowupBuildingcxx . . $ MultiDoBlowupBuilding(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4146 |
int count = 0; |
| 4147 |
|
| 4148 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4149 |
|
| 4150 |
uint16_tcxx . . $ uint16_t# hit_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4151 |
uint16_tcxx . . $ uint16_t# killer_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4152 |
uint16_tcxx . . $ uint16_t# damage = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4153 |
uint16_tcxx . . $ uint16_t# seed = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4154 |
|
| 4155 |
if (Objectscxx . . $ Objects.[hit_objnum].typecxx . . $ object#type. != OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`!) { |
| 4156 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason, trying to blowup a non-building |
| 4157 |
return; |
| 4158 |
} |
| 4159 |
|
| 4160 |
ps_srandcxx . . $ ps_srand(cb2f890c2fdad230).(seed); |
| 4161 |
KillObjectcxx . . $ KillObject(bdb088234d4582fb).(&Objectscxx . . $ Objects.[hit_objnum], &Objectscxx . . $ Objects.[killer_objnum], damage); |
| 4162 |
|
| 4163 |
if (!Multi_building_statescxx . . $ Multi_building_states.[hit_objnum]) { |
| 4164 |
Multi_building_statescxx . . $ Multi_building_states.[hit_objnum] = 1; |
| 4165 |
Multi_num_buildings_changedcxx . . $ Multi_num_buildings_changed.++; |
| 4166 |
} |
| 4167 |
} |
| 4168 |
|
| 4169 |
// Server is telling us about buildings to get rid of |
| 4170 |
void MultiDoBuildingcxx . . $ MultiDoBuilding(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4171 |
int count = 0; |
| 4172 |
|
| 4173 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4174 |
uint8_tcxx . . $ uint8_t# num = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4175 |
for (int i = 0; i < num; i++) { |
| 4176 |
uint16_tcxx . . $ uint16_t# objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4177 |
if (Objectscxx . . $ Objects.[objnum].typecxx . . $ object#type. != OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`!) { |
| 4178 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Error! Server says objnum %d is a building and its not!\n", objnum); |
| 4179 |
} else { |
| 4180 |
Multi_building_statescxx . . $ Multi_building_states.[objnum] = 1; |
| 4181 |
|
| 4182 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[objnum]; |
| 4183 |
|
| 4184 |
if (Object_infocxx . . $ Object_info.[obj->idcxx . . $ object#id.].lo_render_handlecxx . . $ object_info#lo_render_handle. != -1) { |
| 4185 |
obj->flagscxx . . $ object#flags. |= OF_USE_DESTROYED_POLYMODELcxx . . $ `Descent3/object_external.h:283:9`!; |
| 4186 |
obj->lighting_render_typecxx . . $ object#lighting_render_type. = LRT_GOURAUDcxx . . $ `Descent3/object.h:650:9`!; |
| 4187 |
|
| 4188 |
// make parent object only draw center part |
| 4189 |
obj->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info..subobj_flagscxx . . $ polyobj_info#subobj_flags. = 1; |
| 4190 |
} else |
| 4191 |
ObjDeletecxx . . $ ObjDelete(d4f767463ce0a6b3).(objnum); |
| 4192 |
} |
| 4193 |
} |
| 4194 |
|
| 4195 |
Multi_num_buildings_changedcxx . . $ Multi_num_buildings_changed. = num; |
| 4196 |
} |
| 4197 |
|
| 4198 |
doorwaycxx . . $ doorway# *GetDoorwayFromObjectcxx . . $ GetDoorwayFromObject(fd3f60e6b7ee6406).(int door_obj_handle); |
| 4199 |
// Server is telling us the world state |
| 4200 |
void MultiDoWorldStatescxx . . $ MultiDoWorldStates(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4201 |
int count = 0; |
| 4202 |
uint8_tcxx . . $ uint8_t# world_type; |
| 4203 |
|
| 4204 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4205 |
|
| 4206 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a world state packet!\n"); |
| 4207 |
|
| 4208 |
while ((world_type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count)) != WS_ENDcxx . . $ `Descent3/multi_world_state.h:46:9`!) { |
| 4209 |
switch (world_type) { |
| 4210 |
case WS_ROOM_WINDcxx . . $ `Descent3/multi_world_state.h:22:9`!: { |
| 4211 |
// Room wind |
| 4212 |
|
| 4213 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4214 |
Roomscxx . . $ Rooms.[roomnum].windcxx . . $ room#wind..xcxx . . $ vector#x. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4215 |
Roomscxx . . $ Rooms.[roomnum].windcxx . . $ room#wind..ycxx . . $ vector#y. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4216 |
Roomscxx . . $ Rooms.[roomnum].windcxx . . $ room#wind..zcxx . . $ vector#z. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4217 |
|
| 4218 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got room wind packet! Room=%d wind=%f %f %f\n", |
| 4219 |
roomnum, |
| 4220 |
Rooms[roomnum].wind.x, |
| 4221 |
Rooms[roomnum].wind.y, |
| 4222 |
Rooms[roomnum].wind.z); |
| 4223 |
break; |
| 4224 |
} |
| 4225 |
case WS_ROOM_FOGcxx . . $ `Descent3/multi_world_state.h:23:9`!: { |
| 4226 |
// Room wind |
| 4227 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4228 |
Roomscxx . . $ Rooms.[roomnum].fog_depthcxx . . $ room#fog_depth. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4229 |
Roomscxx . . $ Rooms.[roomnum].fog_rcxx . . $ room#fog_r. = ((float)MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count)) / 255.0; |
| 4230 |
Roomscxx . . $ Rooms.[roomnum].fog_gcxx . . $ room#fog_g. = ((float)MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count)) / 255.0; |
| 4231 |
Roomscxx . . $ Rooms.[roomnum].fog_bcxx . . $ room#fog_b. = ((float)MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count)) / 255.0; |
| 4232 |
uint8_tcxx . . $ uint8_t# state = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 4233 |
if (state) |
| 4234 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. |= RF_FOGcxx . . $ `Descent3/room_external.h:184:9`!; |
| 4235 |
else |
| 4236 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. &= ~RF_FOGcxx . . $ `Descent3/room_external.h:184:9`!; |
| 4237 |
|
| 4238 |
break; |
| 4239 |
} |
| 4240 |
|
| 4241 |
case WS_ROOM_LIGHTINGcxx . . $ `Descent3/multi_world_state.h:24:9`!: { |
| 4242 |
// Room lighting |
| 4243 |
uint8_tcxx . . $ uint8_t# state; |
| 4244 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4245 |
Roomscxx . . $ Rooms.[roomnum].pulse_timecxx . . $ room#pulse_time. = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 4246 |
Roomscxx . . $ Rooms.[roomnum].pulse_offsetcxx . . $ room#pulse_offset. = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 4247 |
state = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 4248 |
if (state) |
| 4249 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. |= RF_FLICKERcxx . . $ `Descent3/room_external.h:194:9`!; |
| 4250 |
else |
| 4251 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. &= ~RF_FLICKERcxx . . $ `Descent3/room_external.h:194:9`!; |
| 4252 |
|
| 4253 |
state = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 4254 |
if (state) |
| 4255 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. |= RF_STROBEcxx . . $ `Descent3/room_external.h:193:9`!; |
| 4256 |
else |
| 4257 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. &= ~RF_STROBEcxx . . $ `Descent3/room_external.h:193:9`!; |
| 4258 |
|
| 4259 |
break; |
| 4260 |
} |
| 4261 |
case WS_ROOM_REFUELcxx . . $ `Descent3/multi_world_state.h:34:9`!: { |
| 4262 |
// Room fueling |
| 4263 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4264 |
uint8_tcxx . . $ uint8_t# state = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 4265 |
if (state) |
| 4266 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. |= RF_FUELCENcxx . . $ `Descent3/room_external.h:175:9`!; |
| 4267 |
else |
| 4268 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. &= ~RF_FUELCENcxx . . $ `Descent3/room_external.h:175:9`!; |
| 4269 |
|
| 4270 |
break; |
| 4271 |
} |
| 4272 |
case WS_ROOM_TEXTUREcxx . . $ `Descent3/multi_world_state.h:25:9`!: { |
| 4273 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4274 |
int16_t facenum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4275 |
char str[255]; |
| 4276 |
MultiGetStringcxx . . $ MultiGetString(e054694168e1d38e).(str, data, &count); |
| 4277 |
ChangeRoomFaceTexturecxx . . $ ChangeRoomFaceTexture(1432650661211742).(roomnum, facenum, FindTextureNamecxx . . $ FindTextureName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(str))); |
| 4278 |
break; |
| 4279 |
} |
| 4280 |
case WS_ROOM_GLASScxx . . $ `Descent3/multi_world_state.h:36:9`!: { |
| 4281 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4282 |
int16_t facenum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4283 |
BreakGlassFacecxx . . $ BreakGlassFace(13a53ec972efd3cd).(&Roomscxx . . $ Rooms.[roomnum], facenum); |
| 4284 |
break; |
| 4285 |
} |
| 4286 |
case WS_ROOM_PORTAL_RENDERcxx . . $ `Descent3/multi_world_state.h:26:9`!: { |
| 4287 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4288 |
int16_t portalnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4289 |
uint8_tcxx . . $ uint8_t# flags = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4290 |
Roomscxx . . $ Rooms.[roomnum].portalscxx . . $ room#portals.[portalnum].flagscxx . . $ portal#flags. = flags; |
| 4291 |
break; |
| 4292 |
} |
| 4293 |
case WS_ROOM_PORTAL_BLOCKcxx . . $ `Descent3/multi_world_state.h:39:9`!: { |
| 4294 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4295 |
int16_t portalnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4296 |
uint8_tcxx . . $ uint8_t# flags = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4297 |
Roomscxx . . $ Rooms.[roomnum].portalscxx . . $ room#portals.[portalnum].flagscxx . . $ portal#flags. = flags; |
| 4298 |
break; |
| 4299 |
} |
| 4300 |
case WS_ROOM_DAMAGEcxx . . $ `Descent3/multi_world_state.h:33:9`!: { |
| 4301 |
// Room wind |
| 4302 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4303 |
Roomscxx . . $ Rooms.[roomnum].damagecxx . . $ room#damage. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4304 |
Roomscxx . . $ Rooms.[roomnum].damage_typecxx . . $ room#damage_type. = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 4305 |
break; |
| 4306 |
} |
| 4307 |
case WS_ROOM_GOALSPECFLAGcxx . . $ `Descent3/multi_world_state.h:41:9`!: { |
| 4308 |
// goals & special flags |
| 4309 |
int16_t roomnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4310 |
int mask = (RF_SPECIAL1cxx . . $ `Descent3/room_external.h:185:9`! | RF_SPECIAL2cxx . . $ `Descent3/room_external.h:186:9`! | RF_SPECIAL3cxx . . $ `Descent3/room_external.h:187:9`! | RF_SPECIAL4cxx . . $ `Descent3/room_external.h:188:9`! | RF_SPECIAL5cxx . . $ `Descent3/room_external.h:189:9`! | RF_SPECIAL6cxx . . $ `Descent3/room_external.h:190:9`! | RF_GOAL1cxx . . $ `Descent3/room_external.h:178:9`! | |
| 4311 |
RF_GOAL2cxx . . $ `Descent3/room_external.h:179:9`! | RF_GOAL3cxx . . $ `Descent3/room_external.h:182:9`! | RF_GOAL4cxx . . $ `Descent3/room_external.h:183:9`!); |
| 4312 |
int change_mask = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 4313 |
|
| 4314 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. &= ~mask; |
| 4315 |
Roomscxx . . $ Rooms.[roomnum].flagscxx . . $ room#flags. |= change_mask; |
| 4316 |
|
| 4317 |
break; |
| 4318 |
} |
| 4319 |
case WS_WAYPOINTcxx . . $ `Descent3/multi_world_state.h:28:9`!: { |
| 4320 |
Current_waypointcxx . . $ Current_waypoint. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4321 |
break; |
| 4322 |
} |
| 4323 |
case WS_BUDDYBOTScxx . . $ `Descent3/multi_world_state.h:37:9`!: { |
| 4324 |
int b_index = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4325 |
uint16_tcxx . . $ uint16_t# serv_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4326 |
int local_objnum = Server_object_listcxx . . $ Server_object_list.[serv_objnum]; |
| 4327 |
|
| 4328 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[local_objnum].type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 4329 |
|
| 4330 |
Buddy_handlecxx . . $ Buddy_handle.[b_index] = Objectscxx . . $ Objects.[local_objnum].handlecxx . . $ object#handle.; |
| 4331 |
|
| 4332 |
// now add the guide to that player's inventory (if we need to) |
| 4333 |
if ((!Playerscxx . . $ Players.[b_index].inventorycxx . . $ player#inventory..CheckItemcxx . . $ Inventory#CheckItem(cf9ef193275fa6d8).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!)) && |
| 4334 |
(ObjGetcxx . . $ ObjGet(11672e354c0b263a).(Buddy_handlecxx . . $ Buddy_handle.[b_index])->typecxx . . $ object#type. != OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!)) |
| 4335 |
Playerscxx . . $ Players.[b_index].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!); |
| 4336 |
break; |
| 4337 |
} |
| 4338 |
case WS_BUDDYBOTUPDATEcxx . . $ `Descent3/multi_world_state.h:38:9`!: { |
| 4339 |
int b_index = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4340 |
uint16_tcxx . . $ uint16_t# serv_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4341 |
int local_objnum = Server_object_listcxx . . $ Server_object_list.[serv_objnum]; |
| 4342 |
|
| 4343 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[local_objnum].type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 4344 |
|
| 4345 |
Buddy_handlecxx . . $ Buddy_handle.[b_index] = Objectscxx . . $ Objects.[local_objnum].handlecxx . . $ object#handle.; |
| 4346 |
|
| 4347 |
break; |
| 4348 |
} |
| 4349 |
case WS_PLAYERBFcxx . . $ `Descent3/multi_world_state.h:32:9`!: { |
| 4350 |
Players_typingcxx . . $ Players_typing. = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 4351 |
break; |
| 4352 |
} |
| 4353 |
case WS_MOTDcxx . . $ `Descent3/multi_world_state.h:45:9`!: { |
| 4354 |
MultiGetStringcxx . . $ MultiGetString(e054694168e1d38e).(Multi_message_of_the_daycxx . . $ Multi_message_of_the_day., data, &count); |
| 4355 |
AddPersistentHUDMessagecxx . . $ AddPersistentHUDMessage(2c96e75cbf2ca747).(GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(255, 255, 255), HUD_MSG_PERSISTENT_CENTERcxx . . $ `Descent3/hud.h:312:9`!, |
| 4356 |
Game_window_ycxx . . $ Game_window_y. + (Game_window_hcxx . . $ Game_window_h. / 2) - 20, 10, HPF_FADEOUTcxx . . $ `Descent3/hud.h:401:9`! + HPF_FREESPACE_DRAWcxx . . $ `Descent3/hud.h:402:9`!, |
| 4357 |
SOUND_GOAL_COMPLETEcxx . . $ `Descent3/sounds.h:146:9`!, Multi_message_of_the_daycxx . . $ Multi_message_of_the_day.); |
| 4358 |
break; |
| 4359 |
} |
| 4360 |
case WS_WEATHERcxx . . $ `Descent3/multi_world_state.h:27:9`!: { |
| 4361 |
Weathercxx . . $ Weather..flagscxx . . $ weather#flags. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4362 |
Weathercxx . . $ Weather..rain_intensity_scalarcxx . . $ weather#rain_intensity_scalar. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4363 |
Weathercxx . . $ Weather..snow_intensity_scalarcxx . . $ weather#snow_intensity_scalar. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4364 |
Weathercxx . . $ Weather..lightning_interval_timecxx . . $ weather#lightning_interval_time. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4365 |
Weathercxx . . $ Weather..lightning_rand_valuecxx . . $ weather#lightning_rand_value. = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4366 |
break; |
| 4367 |
} |
| 4368 |
case WS_DOORcxx . . $ `Descent3/multi_world_state.h:29:9`!: { |
| 4369 |
doorwaycxx . . $ doorway# *dp; |
| 4370 |
int objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4371 |
objnum = Server_object_listcxx . . $ Server_object_list.[objnum]; |
| 4372 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].type == OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!); |
| 4373 |
dp = GetDoorwayFromObjectcxx . . $ GetDoorwayFromObject(fd3f60e6b7ee6406).(Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.); |
| 4374 |
|
| 4375 |
int state = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4376 |
uint8_tcxx . . $ uint8_t# locked = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4377 |
if (locked) |
| 4378 |
dp->flagscxx . . $ doorway#flags. |= DF_LOCKEDcxx . . $ `Descent3/doorway.h:110:9`!; |
| 4379 |
else |
| 4380 |
dp->flagscxx . . $ doorway#flags. &= ~DF_LOCKEDcxx . . $ `Descent3/doorway.h:110:9`!; |
| 4381 |
|
| 4382 |
if (state == DOORWAY_OPENINGcxx . . $ `Descent3/doorway.h:102:9`! || state == DOORWAY_WAITINGcxx . . $ `Descent3/doorway.h:104:9`! || dp->statecxx . . $ doorway#state. == DOORWAY_OPENING_AUTOcxx . . $ `Descent3/doorway.h:105:9`!) |
| 4383 |
DoorwayActivatecxx . . $ DoorwayActivate(d4f767463ce0a6b3).(Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.); |
| 4384 |
|
| 4385 |
DoorwaySetPositioncxx . . $ DoorwaySetPosition(43c79ee2f1b9aefe).(Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle., MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count)); |
| 4386 |
|
| 4387 |
break; |
| 4388 |
} |
| 4389 |
case WS_LIGHT_DISTANCEcxx . . $ `Descent3/multi_world_state.h:30:9`!: { |
| 4390 |
int objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4391 |
float val = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4392 |
objnum = Server_object_listcxx . . $ Server_object_list.[objnum]; |
| 4393 |
|
| 4394 |
if (objnum == 65535) |
| 4395 |
break; |
| 4396 |
|
| 4397 |
light_infocxx . . $ light_info# *li = ObjGetLightInfocxx . . $ ObjGetLightInfo(fae61030adf16a8b).(&Objectscxx . . $ Objects.[objnum]); |
| 4398 |
if (li) |
| 4399 |
li->light_distancecxx . . $ light_info#light_distance. = val; |
| 4400 |
|
| 4401 |
break; |
| 4402 |
} |
| 4403 |
case WS_LIGHT_COLORcxx . . $ `Descent3/multi_world_state.h:35:9`!: { |
| 4404 |
int objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4405 |
objnum = Server_object_listcxx . . $ Server_object_list.[objnum]; |
| 4406 |
|
| 4407 |
if (objnum == 65535) |
| 4408 |
break; |
| 4409 |
|
| 4410 |
light_infocxx . . $ light_info# *li = ObjGetLightInfocxx . . $ ObjGetLightInfo(fae61030adf16a8b).(&Objectscxx . . $ Objects.[objnum]); |
| 4411 |
if (li) { |
| 4412 |
li->red_light1cxx . . $ light_info#red_light1. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4413 |
li->green_light1cxx . . $ light_info#green_light1. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4414 |
li->blue_light1cxx . . $ light_info#blue_light1. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4415 |
} else { |
| 4416 |
MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4417 |
MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4418 |
MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4419 |
} |
| 4420 |
|
| 4421 |
break; |
| 4422 |
} |
| 4423 |
case WS_LEVELGOALcxx . . $ `Descent3/multi_world_state.h:40:9`!: { |
| 4424 |
char name[256]; |
| 4425 |
int goal_index = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4426 |
int priority = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 4427 |
|
| 4428 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4429 |
memcpy(name, &data[count], len); |
| 4430 |
count += len; |
| 4431 |
|
| 4432 |
int flags = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 4433 |
int temp = 0xFFFFFFFF; |
| 4434 |
|
| •4435 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Received Level Goal World State: %d\n", goal_index); |
| 4436 |
Level_goalscxx . . $ Level_goals..GoalSetNamecxx . . $ levelgoals#GoalSetName(ceb9eed3194142b2).(goal_index, name); |
| 4437 |
Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(goal_index, LO_CLEAR_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:35:9`!, &temp); |
| 4438 |
Level_goalscxx . . $ Level_goals..GoalStatuscxx . . $ levelgoals#GoalStatus(a197d185bbe4f6f0).(goal_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, &flags, false); |
| 4439 |
Level_goalscxx . . $ Level_goals..GoalPrioritycxx . . $ levelgoals#GoalPriority(f3551096b2e9a55d).(goal_index, LO_SET_SPECIFIEDcxx . . $ `Descent3/levelgoal_external.h:33:9`!, &priority); |
| 4440 |
|
| 4441 |
break; |
| 4442 |
} |
| 4443 |
case WS_SPEWcxx . . $ `Descent3/multi_world_state.h:31:9`!: { |
| 4444 |
spewinfocxx . . $ spewinfo# spew; |
| 4445 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a spew packet!\n"); |
| 4446 |
|
| 4447 |
uint16_tcxx . . $ uint16_t# spewnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4448 |
|
| 4449 |
if (MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count)) |
| 4450 |
spew.use_gunpointcxx . . $ spewinfo#use_gunpoint. = true; |
| 4451 |
else |
| 4452 |
spew.use_gunpointcxx . . $ spewinfo#use_gunpoint. = false; |
| 4453 |
|
| 4454 |
if (spew.use_gunpointcxx . . $ spewinfo#use_gunpoint.) { |
| 4455 |
int objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4456 |
objnum = Server_object_listcxx . . $ Server_object_list.[objnum]; |
| 4457 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(objnum != 65535); |
| 4458 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].flags & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!); |
| 4459 |
|
| 4460 |
spew.gpcxx . . $ spewinfo#$anonymous_type_0#gp..obj_handlecxx . . $ guninfo#obj_handle. = Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.; |
| 4461 |
spew.gpcxx . . $ spewinfo#$anonymous_type_0#gp..gunpointcxx . . $ guninfo#gunpoint. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4462 |
} else { |
| 4463 |
// memcpy (&spew.pt.normal,&data[count],sizeof(vector)); |
| 4464 |
// count+=sizeof(vector); |
| 4465 |
spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..normalcxx . . $ pointinfo#normal. =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 4466 |
// memcpy (&spew.pt.origin,&data[count],sizeof(vector)); |
| 4467 |
// count+=sizeof(vector); |
| 4468 |
spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..origincxx . . $ pointinfo#origin. =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 4469 |
|
| 4470 |
spew.ptcxx . . $ spewinfo#$anonymous_type_0#pt..room_numcxx . . $ pointinfo#room_num. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 4471 |
} |
| 4472 |
|
| 4473 |
spew.randomcxx . . $ spewinfo#random. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4474 |
if (MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count)) |
| 4475 |
spew.real_objcxx . . $ spewinfo#real_obj. = true; |
| 4476 |
else |
| 4477 |
spew.real_objcxx . . $ spewinfo#real_obj. = false; |
| 4478 |
|
| 4479 |
spew.effect_typecxx . . $ spewinfo#effect_type. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4480 |
spew.phys_infocxx . . $ spewinfo#phys_info. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4481 |
spew.dragcxx . . $ spewinfo#drag. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4482 |
spew.masscxx . . $ spewinfo#mass. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4483 |
|
| 4484 |
spew.time_intcxx . . $ spewinfo#time_int. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4485 |
spew.longevitycxx . . $ spewinfo#longevity. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4486 |
spew.lifetimecxx . . $ spewinfo#lifetime. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4487 |
spew.sizecxx . . $ spewinfo#size. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4488 |
spew.speedcxx . . $ spewinfo#speed. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4489 |
|
| 4490 |
uint16_tcxx . . $ uint16_t# local_spewnum = SpewCreatecxx . . $ SpewCreate(a164fa5b42524a40).(&spew); |
| 4491 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(local_spewnum != -1); // DAJ -1FIX |
| 4492 |
local_spewnum &= 0xFF; // Adjust for handle |
| 4493 |
Server_spew_listcxx . . $ Server_spew_list.[spewnum] = local_spewnum; |
| 4494 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got spew of type %d. Server=%d local=%d\n", spew.effect_type, spewnum, local_spewnum); |
| 4495 |
|
| 4496 |
break; |
| 4497 |
} |
| 4498 |
case WS_NO_RENDERcxx . . $ `Descent3/multi_world_state.h:43:9`!: { |
| 4499 |
int objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4500 |
objnum = Server_object_listcxx . . $ Server_object_list.[objnum]; |
| 4501 |
|
| 4502 |
if (objnum == 65535) |
| 4503 |
break; |
| 4504 |
|
| 4505 |
Objectscxx . . $ Objects.[objnum].render_typecxx . . $ object#render_type. = RT_NONEcxx . . $ `Descent3/object_external.h:257:9`!; |
| 4506 |
break; |
| 4507 |
} |
| 4508 |
|
| 4509 |
case WS_OBJECT_PHYS_FLAGScxx . . $ `Descent3/multi_world_state.h:44:9`!: { |
| 4510 |
int objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4511 |
int flags = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 4512 |
objnum = Server_object_listcxx . . $ Server_object_list.[objnum]; |
| 4513 |
|
| 4514 |
if (objnum == 65535) |
| 4515 |
break; |
| 4516 |
Objectscxx . . $ Objects.[objnum].mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. = flags; |
| 4517 |
break; |
| 4518 |
} |
| 4519 |
|
| 4520 |
case WS_OBJECT_ATTACHcxx . . $ `Descent3/multi_world_state.h:42:9`!: { |
| 4521 |
int parent_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4522 |
int n_attach = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4523 |
|
| 4524 |
for (int i = 0; i < n_attach; i++) { |
| 4525 |
int child_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4526 |
if (child_objnum != 65535) { |
| 4527 |
float rad; |
| 4528 |
|
| 4529 |
int attach_index = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4530 |
int attach_type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4531 |
|
| 4532 |
if (attach_type == AT_RADcxx . . $ `Descent3/object_external.h:252:9`!) |
| 4533 |
rad = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4534 |
|
| 4535 |
child_objnum = Server_object_listcxx . . $ Server_object_list.[child_objnum]; |
| 4536 |
int local_objnum = Server_object_listcxx . . $ Server_object_list.[parent_objnum]; |
| 4537 |
|
| 4538 |
if (child_objnum != 65535 && local_objnum != 65535) { |
| 4539 |
if (attach_type == AT_RADcxx . . $ `Descent3/object_external.h:252:9`!) { |
| 4540 |
AttachObjectcxx . . $ AttachObject(45561ecb6c1b979f).(&Objectscxx . . $ Objects.[local_objnum], i, &Objectscxx . . $ Objects.[child_objnum], rad); |
| 4541 |
} else { |
| 4542 |
bool aligned = (attach_type == AT_ALIGNEDcxx . . $ `Descent3/object_external.h:253:9`!) ? true : false; |
| 4543 |
AttachObjectcxx . . $ AttachObject(f6b18a350068acc8).(&Objectscxx . . $ Objects.[local_objnum], i, &Objectscxx . . $ Objects.[child_objnum], attach_index, aligned); |
| 4544 |
} |
| 4545 |
} |
| 4546 |
} |
| 4547 |
} |
| 4548 |
} break; |
| 4549 |
|
| 4550 |
default: |
| 4551 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Unrecognized world state type, get Jason! |
| 4552 |
break; |
| 4553 |
} |
| 4554 |
} |
| 4555 |
} |
| 4556 |
|
| 4557 |
void MultiDoJoinDemoObjectscxx . . $ MultiDoJoinDemoObjects(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4558 |
int count = 0; |
| 4559 |
|
| 4560 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4561 |
|
| 4562 |
int num_demo_objects = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4563 |
int objnum; |
| 4564 |
int local_objnum; |
| 4565 |
|
| 4566 |
Multi_Expect_demo_object_flagscxx . . $ Multi_Expect_demo_object_flags. = true; |
| 4567 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Processing DoJoinDemoObjects...\n"); |
| 4568 |
|
| 4569 |
for (int i = 0; i < num_demo_objects; i++) { |
| 4570 |
objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4571 |
|
| 4572 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(objnum >= 0 && objnum < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!); |
| 4573 |
|
| 4574 |
local_objnum = Server_object_listcxx . . $ Server_object_list.[objnum]; |
| 4575 |
|
| 4576 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(local_objnum >= 0 && local_objnum < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!); |
| 4577 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[local_objnum].type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 4578 |
|
| 4579 |
Objectscxx . . $ Objects.[local_objnum].flagscxx . . $ object#flags. |= OF_CLIENTDEMOOBJECTcxx . . $ `Descent3/object_external.h:303:9`!; |
| 4580 |
} |
| 4581 |
} |
| 4582 |
|
| 4583 |
// Server is telling us about objects in the game |
| 4584 |
void MultiDoJoinObjectscxx . . $ MultiDoJoinObjects(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4585 |
int count = 0; |
| 4586 |
|
| 4587 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4588 |
uint8_tcxx . . $ uint8_t# num_objects = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4589 |
|
| 4590 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got join object packet. Num objects=%d\n", num_objects); |
| 4591 |
|
| 4592 |
for (int i = 0; i < num_objects; i++) { |
| 4593 |
bool obj_is_dummy = false; |
| 4594 |
|
| 4595 |
// Extract info about this object |
| 4596 |
uint16_tcxx . . $ uint16_t# server_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4597 |
uint8_tcxx . . $ uint8_t# type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4598 |
|
| 4599 |
//@@mprintf(0,"Got join objnum %d from server. Type=%d\n",server_objnum,type); |
| 4600 |
|
| 4601 |
if (type == OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!) { |
| 4602 |
obj_is_dummy = true; |
| 4603 |
type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4604 |
} |
| 4605 |
|
| 4606 |
uint32_tcxx . . $ uint32_t# checksum; |
| 4607 |
matrixcxx . . $ matrix# orient; |
| 4608 |
uint8_tcxx . . $ uint8_t# name_len = 0; |
| 4609 |
uint8_tcxx . . $ uint8_t# num_persist_vars = 0; |
| 4610 |
|
| 4611 |
vm_MakeIdentitycxx . . $ vm_MakeIdentity(dca75c48c9ab5b54).(&orient); |
| 4612 |
|
| 4613 |
if (type != OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`! && type != OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!) { |
| 4614 |
// Get checksum |
| 4615 |
checksum = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 4616 |
} |
| 4617 |
|
| 4618 |
if (type != OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`! && type != OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!) { |
| 4619 |
multi_orientationcxx . . $ multi_orientation# multi_mat; |
| 4620 |
|
| 4621 |
// Get orientation |
| 4622 |
memcpy(&multi_mat, &data[count], sizeof(multi_orientationcxx . . $ multi_orientation#)); |
| 4623 |
MultiMatrixMakeEndianFriendlycxx . . $ MultiMatrixMakeEndianFriendly(65dda6e21b1f7c2d).(&multi_mat); |
| 4624 |
MultiExtractMatrixcxx . . $ MultiExtractMatrix(b91390fee78ca2c4).(&orient, &multi_mat); |
| 4625 |
count += sizeof(multi_orientationcxx . . $ multi_orientation#); |
| 4626 |
} |
| 4627 |
|
| 4628 |
int id; |
| 4629 |
|
| 4630 |
if (type != OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`! && type != OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`! && type != OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!) { |
| 4631 |
id = MultiMatchGenericcxx . . $ MultiMatchGeneric(4c679297bf94b9eb).(checksum); |
| 4632 |
|
| 4633 |
if (id == -1) { |
| 4634 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server data doesn't match client data!\n"); |
| 4635 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(1); |
| 4636 |
// Error ("Server data doesn't match client data!"); |
| 4637 |
MultiMatchGenericcxx . . $ MultiMatchGeneric(4c679297bf94b9eb).(checksum); |
| 4638 |
} else { |
| 4639 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Object_info[id].type == type, "DoJoinObjects type mismatch!"); // Get Jason! |
| 4640 |
} |
| 4641 |
} else if (type == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) { |
| 4642 |
id = checksum; |
| 4643 |
} else // camera |
| 4644 |
id = 0; |
| 4645 |
|
| 4646 |
vectorcxx . . $ vector# pos; |
| 4647 |
uint16_tcxx . . $ uint16_t# short_roomnum; |
| 4648 |
uint8_tcxx . . $ uint8_t# terrain = 0; |
| 4649 |
uint8_tcxx . . $ uint8_t# lifeleft = 255; |
| 4650 |
int roomnum; |
| 4651 |
|
| 4652 |
if (type != OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!) { |
| 4653 |
// memcpy (&pos,&data[count],sizeof(vector)); |
| 4654 |
// count+=sizeof(vector); |
| 4655 |
pos =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 4656 |
|
| 4657 |
short_roomnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 4658 |
terrain = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4659 |
lifeleft = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 4660 |
|
| 4661 |
roomnum = short_roomnum; |
| 4662 |
} |
| 4663 |
|
| 4664 |
if (type == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) { |
| 4665 |
// Get message if marker |
| 4666 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4667 |
memcpy(MarkerMessagescxx . . $ MarkerMessages.[id], &data[count], len); |
| 4668 |
count += len; |
| 4669 |
} |
| 4670 |
|
| 4671 |
if (terrain) |
| 4672 |
roomnum = MAKE_ROOMNUMcxx . . $ `lib/object_external_struct.h:124:9`!(roomnum); |
| 4673 |
|
| 4674 |
int local_objnum; |
| 4675 |
|
| 4676 |
// Don't recreate lightmap objects |
| 4677 |
if (type != OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`! && (type == OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`! || type == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`! || |
| 4678 |
Object_infocxx . . $ Object_info.[id].lighting_infocxx . . $ object_info#lighting_info..lighting_render_typecxx . . $ light_info#lighting_render_type. != LRT_LIGHTMAPScxx . . $ `Descent3/object.h:651:9`!)) { |
| 4679 |
local_objnum = ObjCreatecxx . . $ ObjCreate(849c3da80a4f387f).(type, id, roomnum, &pos, &orient); |
| 4680 |
} else { |
| 4681 |
|
| 4682 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(type == Objects[server_objnum].type); |
| 4683 |
if (type != OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!) |
| 4684 |
ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(&Objectscxx . . $ Objects.[server_objnum], &pos, roomnum, &orient, false); |
| 4685 |
local_objnum = server_objnum; |
| 4686 |
|
| 4687 |
if (type == OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`! || |
| 4688 |
(type != OBJ_CAMERAcxx . . $ `Descent3/object_external.h:169:9`! && Object_infocxx . . $ Object_info.[id].lighting_infocxx . . $ object_info#lighting_info..lighting_render_typecxx . . $ light_info#lighting_render_type. == LRT_LIGHTMAPScxx . . $ `Descent3/object.h:651:9`!)) { |
| 4689 |
Server_lightmap_listcxx . . $ Server_lightmap_list.[Num_server_lm_objectscxx . . $ Num_server_lm_objects.] = server_objnum; |
| 4690 |
Num_server_lm_objectscxx . . $ Num_server_lm_objects.++; |
| 4691 |
} |
| 4692 |
} |
| 4693 |
|
| 4694 |
if (local_objnum < 0) { |
| 4695 |
Errorcxx . . $ Error(326aeb464d16410c).("Ran out of objects!"); |
| 4696 |
return; |
| 4697 |
} |
| 4698 |
|
| 4699 |
if (lifeleft != 255) { |
| 4700 |
Objectscxx . . $ Objects.[local_objnum].flagscxx . . $ object#flags. |= OF_USES_LIFELEFTcxx . . $ `Descent3/object_external.h:276:9`!; |
| 4701 |
Objectscxx . . $ Objects.[local_objnum].lifeleftcxx . . $ object#lifeleft. = lifeleft; |
| 4702 |
} |
| 4703 |
|
| 4704 |
// Put it in our lists |
| 4705 |
Local_object_listcxx . . $ Local_object_list.[local_objnum] = server_objnum; |
| 4706 |
Server_object_listcxx . . $ Server_object_list.[server_objnum] = local_objnum; |
| 4707 |
|
| 4708 |
//?? InitObjectScripts (&Objects[local_objnum],false); |
| 4709 |
|
| 4710 |
// Ghost the object if it is a dummy |
| 4711 |
if (obj_is_dummy) { |
| 4712 |
ObjGhostObjectcxx . . $ ObjGhostObject(d4f767463ce0a6b3).(local_objnum); |
| 4713 |
} |
| 4714 |
|
| 4715 |
Objectscxx . . $ Objects.[local_objnum].flagscxx . . $ object#flags. |= OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!; |
| 4716 |
} |
| 4717 |
} |
| 4718 |
|
| 4719 |
// Starts a death sequence of a player |
| 4720 |
void MultiDoPlayerDeadcxx . . $ MultiDoPlayerDead(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4721 |
int count = 0; |
| 4722 |
|
| 4723 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4724 |
int slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4725 |
int fate = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4726 |
|
| 4727 |
Playerscxx . . $ Players.[slot].damage_magnitudecxx . . $ player#damage_magnitude. = 0; |
| 4728 |
Playerscxx . . $ Players.[slot].edrain_magnitudecxx . . $ player#edrain_magnitude. = 0; |
| 4729 |
|
| 4730 |
InitiatePlayerDeathcxx . . $ InitiatePlayerDeath(638d79040b3e553a).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.], false, fate); |
| 4731 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle. != SOUND_NONE_INDEXcxx . . $ `Descent3/sounds.h:105:9`!) { |
| 4732 |
Sound_systemcxx . . $ Sound_system..StopSoundLoopingcxx . . $ hlsSystem#StopSoundLooping(d4f767463ce0a6b3).(Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle.); |
| 4733 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].effect_infocxx . . $ object#effect_info.->sound_handlecxx . . $ effect_info_s#sound_handle. = SOUND_NONE_INDEXcxx . . $ `Descent3/sounds.h:105:9`!; |
| 4734 |
} |
| 4735 |
} |
| 4736 |
|
| 4737 |
// The server sends to everyone that the player is dead |
| 4738 |
void MultiSendPlayerDeadcxx . . $ MultiSendPlayerDead(9633529ce3c4ff50).(int slot, uint8_tcxx . . $ uint8_t# fate) { |
| 4739 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, "Client in SendPlayerDead!"); |
| 4740 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 4741 |
int count = 0; |
| 4742 |
int size_offset; |
| 4743 |
|
| 4744 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYER_DEADcxx . . $ `Descent3/multi.h:545:9`!, data, &count, 1); |
| 4745 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 4746 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(fate, data, &count); |
| 4747 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 4748 |
|
| 4749 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!); |
| 4750 |
MultiDoPlayerDeadcxx . . $ MultiDoPlayerDead(f25546b61a629de7).(data); |
| 4751 |
if (Game_is_master_tracker_gamecxx . . $ Game_is_master_tracker_game.) { |
| 4752 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Adding kill and death to player stats. Killer = %d Killee = %d\n", |
| 4753 |
Objects[Players[slot].killer_objnum].id, |
| 4754 |
slot); |
| 4755 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].killer_objnumcxx . . $ player#killer_objnum.].idcxx . . $ object#id. == slot) { |
| 4756 |
Playerscxx . . $ Players.[slot].suicidescxx . . $ player#suicides.++; |
| 4757 |
} else { |
| 4758 |
Playerscxx . . $ Players.[Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].killer_objnumcxx . . $ player#killer_objnum.].idcxx . . $ object#id.].killscxx . . $ player#kills.++; |
| 4759 |
Playerscxx . . $ Players.[slot].deathscxx . . $ player#deaths.++; |
| 4760 |
} |
| 4761 |
} |
| 4762 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].killer_objnumcxx . . $ player#killer_objnum.].idcxx . . $ object#id. == slot) { |
| 4763 |
Multi_deathscxx . . $ Multi_deaths.[slot]++; |
| 4764 |
} else { |
| 4765 |
Multi_killscxx . . $ Multi_kills.[Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].killer_objnumcxx . . $ player#killer_objnum.].idcxx . . $ object#id.]++; |
| 4766 |
Multi_deathscxx . . $ Multi_deaths.[slot]++; |
| 4767 |
} |
| 4768 |
ScoreAPIPlayerKilledcxx . . $ ScoreAPIPlayerKilled(3e454b8ccf442868).(Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].killer_objnumcxx . . $ player#killer_objnum.].idcxx . . $ object#id., slot); |
| 4769 |
} |
| 4770 |
|
| 4771 |
// A player is coming back from the dead...restore his ship! |
| 4772 |
void MultiDoRenewPlayercxx . . $ MultiDoRenewPlayer(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4773 |
int count = 0; |
| 4774 |
bool add_guidebot = false; |
| 4775 |
|
| 4776 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4777 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4778 |
int start_slot = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 4779 |
|
| 4780 |
if (MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count)) { |
| 4781 |
add_guidebot = true; |
| 4782 |
} |
| 4783 |
|
| 4784 |
EndPlayerDeathcxx . . $ EndPlayerDeath(d4f767463ce0a6b3).(slot); |
| 4785 |
|
| 4786 |
PlayerMoveToStartPoscxx . . $ PlayerMoveToStartPos(3e454b8ccf442868).(slot, start_slot); |
| 4787 |
MultiAnnounceEffectcxx . . $ MultiAnnounceEffect(4359ca8c31d2d955).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.], Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].sizecxx . . $ object#size. * 5, 1.0); |
| 4788 |
|
| 4789 |
// Make him invul for 2 seconds |
| 4790 |
MakePlayerInvulnerablecxx . . $ MakePlayerInvulnerable(a421cb528a2d8d2f).(slot, 2.0); |
| 4791 |
|
| 4792 |
// add guidebot if needed |
| 4793 |
if (add_guidebot) { |
| 4794 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "MULTI: Adding guidebot to respawned player (%s)\n", Players[slot].callsign); |
| 4795 |
if (!Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..CheckItemcxx . . $ Inventory#CheckItem(cf9ef193275fa6d8).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!)) |
| 4796 |
Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!); |
| 4797 |
} |
| 4798 |
|
| 4799 |
// Update player position in demo |
| 4800 |
if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 4801 |
DemoWriteChangedObjcxx . . $ DemoWriteChangedObj(419c470199a90a97).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.]); |
| 4802 |
} |
| 4803 |
} |
| 4804 |
|
| 4805 |
// Tell everyone that a player is coming back from the dead |
| 4806 |
void MultiSendRenewPlayercxx . . $ MultiSendRenewPlayer(d4f767463ce0a6b3).(int slot) { |
| 4807 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, "Client in SendRenewPlayer!"); |
| 4808 |
|
| 4809 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 4810 |
int count = 0; |
| 4811 |
int size_offset; |
| 4812 |
|
| 4813 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_RENEW_PLAYERcxx . . $ `Descent3/multi.h:551:9`!, data, &count, 1); |
| 4814 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 4815 |
|
| 4816 |
// Get random start slot |
| 4817 |
int start_slot = PlayerGetRandomStartPositioncxx . . $ PlayerGetRandomStartPosition(7864480464b09eea).(slot); |
| 4818 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(start_slot, data, &count); |
| 4819 |
|
| 4820 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].activecxx . . $ player_pos_suppress#active. = true; |
| 4821 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].expire_timecxx . . $ player_pos_suppress#expire_time. = Gametimecxx . . $ Gametime. + PLAYER_POS_HACK_TIMEcxx . . $ `Descent3/player.h:410:9`!; |
| 4822 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].roomcxx . . $ player_pos_suppress#room. = Playerscxx . . $ Players.[start_slot].start_roomnumcxx . . $ player#start_roomnum.; |
| 4823 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].ignored_poscxx . . $ player_pos_suppress#ignored_pos. = 0; |
| 4824 |
|
| 4825 |
// check to see if they need to add a guidebot to the player's inventory |
| 4826 |
if (Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_ALLOWGUIDEBOTcxx . . $ `Descent3/multi_external.h:232:9`!) { |
| 4827 |
if ((!Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..CheckItemcxx . . $ Inventory#CheckItem(cf9ef193275fa6d8).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!)) && |
| 4828 |
(ObjGetcxx . . $ ObjGet(11672e354c0b263a).(Buddy_handlecxx . . $ Buddy_handle.[slot])->typecxx . . $ object#type. != OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!)) { |
| 4829 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(1, data, &count); |
| 4830 |
} else { |
| 4831 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(0, data, &count); |
| 4832 |
} |
| 4833 |
} else { |
| 4834 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(0, data, &count); |
| 4835 |
} |
| 4836 |
|
| 4837 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 4838 |
|
| 4839 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, false); |
| 4840 |
|
| 4841 |
MultiDoRenewPlayercxx . . $ MultiDoRenewPlayer(f25546b61a629de7).(data); |
| 4842 |
} |
| 4843 |
|
| 4844 |
// This player says he's done dying |
| 4845 |
void MultiDoEndPlayerDeathcxx . . $ MultiDoEndPlayerDeath(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4846 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, "Client in DoEndPlayerDeath!"); |
| 4847 |
|
| 4848 |
int count = 0; |
| 4849 |
|
| 4850 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4851 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4852 |
|
| 4853 |
if (Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`! || Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`!) |
| 4854 |
MultiSendRenewPlayercxx . . $ MultiSendRenewPlayer(d4f767463ce0a6b3).(slot); |
| 4855 |
} |
| 4856 |
void GetServerGameTimecxx . . $ GetServerGameTime(49f6e7a06ebc5aa8).() { |
| 4857 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!, "Server in GetServerGameTime!"); |
| 4858 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 4859 |
int count = 0; |
| 4860 |
int size; |
| 4861 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Requesting gametime from server\n"); |
| 4862 |
Got_new_game_timecxx . . $ Got_new_game_time. = 0; |
| 4863 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_GET_GAMETIMEcxx . . $ `Descent3/multi.h:565:9`!, outdata, &count); |
| 4864 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(), outdata, &count); |
| 4865 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 4866 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&Netgamecxx . . $ Netgame..server_addresscxx . . $ netgame_info#server_address., outdata, count, 0); |
| 4867 |
} |
| 4868 |
void MultiDoGameTimeReqcxx . . $ MultiDoGameTimeReq(b4ed6bda213be74).(uint8_tcxx . . $ uint8_t# *data, network_addresscxx . . $ network_address# *from_addr) { |
| 4869 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 4870 |
int count = 0; |
| 4871 |
int incount = 0; |
| 4872 |
int size; |
| 4873 |
|
| 4874 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 4875 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Processing request for gametime\n"); |
| 4876 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &incount); |
| 4877 |
float client_time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &incount); |
| 4878 |
|
| 4879 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_HERE_IS_GAMETIMEcxx . . $ `Descent3/multi.h:566:9`!, outdata, &count); |
| 4880 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(client_time, outdata, &count); |
| 4881 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(Gametimecxx . . $ Gametime., outdata, &count); |
| 4882 |
|
| 4883 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 4884 |
|
| 4885 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(from_addr, outdata, count, 0); |
| 4886 |
} |
| 4887 |
|
| 4888 |
void MultiDoSetGameTimecxx . . $ MultiDoSetGameTime(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4889 |
float req_time; |
| 4890 |
float server_latency; |
| 4891 |
float server_game_time; |
| 4892 |
int count = 0; |
| 4893 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Processing and setting new for gametime\n"); |
| 4894 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 4895 |
// Now get the latency. We calculate this by comparing the current timer to the time we got back |
| 4896 |
// Which was the time that we sent the request. |
| 4897 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4898 |
req_time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4899 |
server_game_time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 4900 |
|
| 4901 |
// Half of the ping time is the latency |
| 4902 |
server_latency = (timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - req_time) / 2; |
| 4903 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server Latency = %f\n", server_latency); |
| 4904 |
|
| 4905 |
Gametimecxx . . $ Gametime. = (server_game_time + server_latency); |
| 4906 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "New gametime = %f\n", Gametime); |
| 4907 |
Got_new_game_timecxx . . $ Got_new_game_time. = 1; |
| 4908 |
} |
| 4909 |
|
| 4910 |
// Tell the server that I'm done dying |
| 4911 |
void MultiSendEndPlayerDeathcxx . . $ MultiSendEndPlayerDeath(49f6e7a06ebc5aa8).() { |
| 4912 |
int count = 0; |
| 4913 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 4914 |
int size_offset; |
| 4915 |
|
| 4916 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending end player death packet!\n"); |
| 4917 |
|
| 4918 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_END_PLAYER_DEATHcxx . . $ `Descent3/multi.h:550:9`!, data, &count); |
| 4919 |
|
| 4920 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 4921 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 4922 |
|
| 4923 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) |
| 4924 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 4925 |
else |
| 4926 |
MultiDoEndPlayerDeathcxx . . $ MultiDoEndPlayerDeath(f25546b61a629de7).(data); |
| 4927 |
} |
| 4928 |
|
| 4929 |
// Prints out a message we got from the server |
| 4930 |
void MultiDoMessageFromServercxx . . $ MultiDoMessageFromServer(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 4931 |
static int sound_id = -2; |
| 4932 |
int count = 0; |
| 4933 |
char message[255]; |
| 4934 |
|
| 4935 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 4936 |
|
| 4937 |
ddgr_colorcxx . . $ ddgr_color# color = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 4938 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 4939 |
|
| 4940 |
memcpy(message, &data[count], len); |
| 4941 |
count += len; |
| 4942 |
|
| 4943 |
// Play the player hud message sound |
| 4944 |
if (sound_id == -2) { |
| 4945 |
sound_id = FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).("Hudmessage"); |
| 4946 |
} |
| 4947 |
|
| 4948 |
if (sound_id > -1) { |
| 4949 |
Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(d251026853493025).(sound_id); |
| 4950 |
} |
| 4951 |
|
| 4952 |
AddColoredHUDMessagecxx . . $ AddColoredHUDMessage(7778decf30f5fc42).(color, "%s", message); // added "%s" because message could have % signs, formatting issue. |
| 4953 |
} |
| 4954 |
|
| 4955 |
// Sends a message from the server to the client |
| 4956 |
void MultiSendMessageFromServercxx . . $ MultiSendMessageFromServer(99469d7ff9a1485a).(int color, char *message, int to) { |
| 4957 |
int count = 0; |
| 4958 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 4959 |
int size_offset; |
| 4960 |
|
| 4961 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 4962 |
|
| 4963 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_MESSAGE_FROM_SERVERcxx . . $ `Descent3/multi.h:549:9`!, data, &count, 1); |
| 4964 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(color, data, &count); |
| 4965 |
|
| 4966 |
uint8_tcxx . . $ uint8_t# len = strlen(message) + 1; |
| 4967 |
|
| 4968 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, data, &count); |
| 4969 |
|
| 4970 |
memcpy(&data[count], message, len); |
| 4971 |
|
| 4972 |
count += len; |
| 4973 |
|
| 4974 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 4975 |
|
| 4976 |
if (to == MULTI_SEND_MESSAGE_ALLcxx . . $ `Descent3/multi.h:717:9`!) { |
| 4977 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, false); |
| 4978 |
MultiDoMessageFromServercxx . . $ MultiDoMessageFromServer(f25546b61a629de7).(data); |
| 4979 |
} else { |
| 4980 |
int team = -1; |
| 4981 |
|
| 4982 |
switch (to) { |
| 4983 |
case MULTI_SEND_MESSAGE_RED_TEAMcxx . . $ `Descent3/multi.h:718:9`!: |
| 4984 |
team = 0; |
| 4985 |
break; |
| 4986 |
case MULTI_SEND_MESSAGE_BLUE_TEAMcxx . . $ `Descent3/multi.h:719:9`!: |
| 4987 |
team = 1; |
| 4988 |
break; |
| 4989 |
case MULTI_SEND_MESSAGE_GREEN_TEAMcxx . . $ `Descent3/multi.h:720:9`!: |
| 4990 |
team = 2; |
| 4991 |
break; |
| 4992 |
case MULTI_SEND_MESSAGE_YELLOW_TEAMcxx . . $ `Descent3/multi.h:721:9`!: |
| 4993 |
team = 3; |
| 4994 |
break; |
| 4995 |
} |
| 4996 |
|
| 4997 |
if (team == -1) { |
| 4998 |
// send it off to one person |
| 4999 |
if (to >= 0 && to < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!) { |
| 5000 |
if (NetPlayerscxx . . $ NetPlayers.[to].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[to].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`! && to != Player_numcxx . . $ Player_num.) { |
| 5001 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[to].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 5002 |
} |
| 5003 |
} |
| 5004 |
if (to == Player_numcxx . . $ Player_num.) |
| 5005 |
MultiDoMessageFromServercxx . . $ MultiDoMessageFromServer(f25546b61a629de7).(data); |
| 5006 |
} else { |
| 5007 |
// send it off only to teammates |
| 5008 |
for (int p = 0; p < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; p++) { |
| 5009 |
if (NetPlayerscxx . . $ NetPlayers.[p].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`! && NetPlayerscxx . . $ NetPlayers.[p].sequencecxx . . $ netplayer#sequence. == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`! && |
| 5010 |
Playerscxx . . $ Players.[p].teamcxx . . $ player#team. == team && p != Player_numcxx . . $ Player_num.) { |
| 5011 |
|
| 5012 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[p].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 5013 |
} |
| 5014 |
} |
| 5015 |
if (team == Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].teamcxx . . $ player#team.) |
| 5016 |
MultiDoMessageFromServercxx . . $ MultiDoMessageFromServer(f25546b61a629de7).(data); |
| 5017 |
} |
| 5018 |
} |
| 5019 |
} |
| 5020 |
|
| 5021 |
// Prints out a message we got from the server |
| 5022 |
void MultiDoMessageToServercxx . . $ MultiDoMessageToServer(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5023 |
int count = 0; |
| 5024 |
char message[255]; |
| 5025 |
|
| 5026 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 5027 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5028 |
|
| 5029 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5030 |
int towho = (int8_t)MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5031 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5032 |
|
| 5033 |
memcpy(message, &data[count], len); |
| 5034 |
count += len; |
| 5035 |
|
| 5036 |
MultiSendMessageFromServercxx . . $ MultiSendMessageFromServer(99469d7ff9a1485a).(GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(0, 128, 255), message, towho); |
| 5037 |
} |
| 5038 |
|
| 5039 |
// Sends a message from the server to the client |
| 5040 |
void MultiSendMessageToServercxx . . $ MultiSendMessageToServer(99469d7ff9a1485a).(int color, char *message, int to_who) { |
| 5041 |
int count = 0; |
| 5042 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5043 |
int size_offset; |
| 5044 |
|
| 5045 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_MESSAGE_TO_SERVERcxx . . $ `Descent3/multi.h:555:9`!, data, &count); |
| 5046 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 5047 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(to_who, data, &count); |
| 5048 |
|
| 5049 |
uint8_tcxx . . $ uint8_t# len = strlen(message) + 1; |
| 5050 |
|
| 5051 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, data, &count); |
| 5052 |
|
| 5053 |
memcpy(&data[count], message, len); |
| 5054 |
|
| 5055 |
count += len; |
| 5056 |
|
| 5057 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5058 |
|
| 5059 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 5060 |
} |
| 5061 |
|
| 5062 |
// Executes a dll that the server says to |
| 5063 |
void MultiDoExecuteDLLcxx . . $ MultiDoExecuteDLL(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5064 |
int count = 0; |
| 5065 |
float fParam = 0; |
| 5066 |
ptrdiff_t iParam = 0; |
| 5067 |
|
| 5068 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5069 |
|
| 5070 |
uint16_tcxx . . $ uint16_t# eventnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5071 |
int16_t me_objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5072 |
int16_t it_objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5073 |
|
| 5074 |
if (MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count)) { |
| 5075 |
// we need to extract out parameters |
| 5076 |
fParam = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5077 |
iParam = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 5078 |
|
| 5079 |
switch (eventnum) { |
| 5080 |
case EVT_CLIENT_GAMEWALLCOLLIDEcxx . . $ `lib/d3events.h:121:9`!: |
| 5081 |
case EVT_GAMEWALLCOLLIDEcxx . . $ `lib/d3events.h:78:9`!: |
| 5082 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..pointcxx . . $ game_collide_info#point..xcxx . . $ vector#x. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5083 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..pointcxx . . $ game_collide_info#point..ycxx . . $ vector#y. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5084 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..pointcxx . . $ game_collide_info#point..zcxx . . $ vector#z. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5085 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..normalcxx . . $ game_collide_info#normal..xcxx . . $ vector#x. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5086 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..normalcxx . . $ game_collide_info#normal..ycxx . . $ vector#y. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5087 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..normalcxx . . $ game_collide_info#normal..zcxx . . $ vector#z. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5088 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..hitspeedcxx . . $ game_collide_info#hitspeed. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5089 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..hit_dotcxx . . $ game_collide_info#hit_dot. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5090 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..hitsegcxx . . $ game_collide_info#hitseg. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 5091 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..hitwallcxx . . $ game_collide_info#hitwall. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 5092 |
break; |
| 5093 |
case EVT_CLIENT_GAMECOLLIDEcxx . . $ `lib/d3events.h:95:9`!: |
| 5094 |
case EVT_GAMECOLLIDEcxx . . $ `lib/d3events.h:67:9`!: |
| 5095 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..pointcxx . . $ game_collide_info#point..xcxx . . $ vector#x. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5096 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..pointcxx . . $ game_collide_info#point..ycxx . . $ vector#y. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5097 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..pointcxx . . $ game_collide_info#point..zcxx . . $ vector#z. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5098 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..normalcxx . . $ game_collide_info#normal..xcxx . . $ vector#x. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5099 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..normalcxx . . $ game_collide_info#normal..ycxx . . $ vector#y. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5100 |
DLLInfocxx . . $ DLLInfo..collide_infocxx . . $ dllinfo#collide_info..normalcxx . . $ game_collide_info#normal..zcxx . . $ vector#z. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5101 |
break; |
| 5102 |
case EVT_GAMEOBJCHANGESEGcxx . . $ `lib/d3events.h:79:9`!: |
| 5103 |
case EVT_CLIENT_GAMEOBJCHANGESEGcxx . . $ `lib/d3events.h:122:9`!: |
| 5104 |
case EVT_GAMEPLAYERCHANGESEGcxx . . $ `lib/d3events.h:68:9`!: |
| 5105 |
case EVT_CLIENT_GAMEPLAYERCHANGESEGcxx . . $ `lib/d3events.h:97:9`!: |
| 5106 |
DLLInfocxx . . $ DLLInfo..newsegcxx . . $ dllinfo#newseg. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 5107 |
DLLInfocxx . . $ DLLInfo..oldsegcxx . . $ dllinfo#oldseg. = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 5108 |
break; |
| 5109 |
} |
| 5110 |
} |
| 5111 |
|
| 5112 |
int16_t local_me_objnum; |
| 5113 |
int16_t local_it_objnum; |
| 5114 |
|
| 5115 |
if (me_objnum == -1) |
| 5116 |
local_me_objnum = -1; |
| 5117 |
else { |
| 5118 |
local_me_objnum = Server_object_listcxx . . $ Server_object_list.[me_objnum]; |
| 5119 |
if (local_me_objnum == 65535) { |
| 5120 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid object in DoExecuteDLL!\n"); |
| 5121 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 5122 |
return; |
| 5123 |
} |
| 5124 |
} |
| 5125 |
|
| 5126 |
if (it_objnum == -1) |
| 5127 |
local_it_objnum = -1; |
| 5128 |
else { |
| 5129 |
local_it_objnum = Server_object_listcxx . . $ Server_object_list.[it_objnum]; |
| 5130 |
if (local_it_objnum == 65535) { |
| 5131 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid object in DoExecuteDLL!\n"); |
| 5132 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 5133 |
return; |
| 5134 |
} |
| 5135 |
} |
| 5136 |
|
| 5137 |
// mprintf(0,"Received MP_EXECUTE_DLL packet! type=%d |
| 5138 |
// id=%d\n",Objects[local_me_objnum].type,Objects[local_me_objnum].id); |
| 5139 |
|
| 5140 |
int mehandle; |
| 5141 |
int ithandle; |
| 5142 |
|
| 5143 |
if (local_me_objnum == -1) |
| 5144 |
mehandle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 5145 |
else |
| 5146 |
mehandle = Objectscxx . . $ Objects.[local_me_objnum].handlecxx . . $ object#handle.; |
| 5147 |
|
| 5148 |
if (local_it_objnum == -1) |
| 5149 |
ithandle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 5150 |
else |
| 5151 |
ithandle = Objectscxx . . $ Objects.[local_it_objnum].handlecxx . . $ object#handle.; |
| 5152 |
|
| 5153 |
DLLInfocxx . . $ DLLInfo..me_handlecxx . . $ dllinfo#me_handle. = mehandle; |
| 5154 |
DLLInfocxx . . $ DLLInfo..it_handlecxx . . $ dllinfo#it_handle. = ithandle; |
| 5155 |
DLLInfocxx . . $ DLLInfo..fParamcxx . . $ dllinfo#fParam. = fParam; |
| 5156 |
DLLInfocxx . . $ DLLInfo..iParamcxx . . $ dllinfo#iParam. = iParam; |
| 5157 |
|
| 5158 |
CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(eventnum, &DLLInfocxx . . $ DLLInfo.); |
| 5159 |
} |
| 5160 |
|
| 5161 |
// Server is telling us to create an object |
| 5162 |
void MultiDoObjectcxx . . $ MultiDoObject(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5163 |
int count = 0; |
| 5164 |
int parent_handle; |
| 5165 |
bool self_parent = false; |
| 5166 |
|
| 5167 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5168 |
|
| 5169 |
// Extract info about this object |
| 5170 |
uint8_tcxx . . $ uint8_t# announce = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5171 |
int server_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 5172 |
int parent_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 5173 |
|
| 5174 |
if (parent_objnum == server_objnum) |
| 5175 |
self_parent = true; |
| 5176 |
/* |
| 5177 |
mprintf(0,"MultiDoObject() got a new object. Server's objnum = %d Parent objnum = %d\n", |
| 5178 |
server_objnum, |
| 5179 |
parent_objnum); |
| 5180 |
*/ |
| 5181 |
if (self_parent || parent_objnum == 65535) |
| 5182 |
parent_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 5183 |
else { |
| 5184 |
int local_parent = Server_object_listcxx . . $ Server_object_list.[parent_objnum]; |
| 5185 |
|
| 5186 |
if (local_parent == 65535) // || !(Objects[local_parent].flags2 & OF2_SERVER_OBJECT)) |
| 5187 |
{ |
| 5188 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(1, "Invalid parent for object!"); |
| 5189 |
return; |
| 5190 |
} |
| 5191 |
|
| 5192 |
parent_handle = Objectscxx . . $ Objects.[local_parent].handlecxx . . $ object#handle.; |
| 5193 |
} |
| 5194 |
|
| 5195 |
uint8_tcxx . . $ uint8_t# type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5196 |
uint32_tcxx . . $ uint32_t# checksum = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 5197 |
uint8_tcxx . . $ uint8_t# dummy_type = OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!; |
| 5198 |
if (type == OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!) // we need to get the original type |
| 5199 |
dummy_type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5200 |
|
| 5201 |
/*char name[255]; |
| 5202 |
uint8_t len=MultiGetByte (data,&count); |
| 5203 |
memcpy (name,&data[count],len);*/ |
| 5204 |
|
| 5205 |
int id; |
| 5206 |
if (type == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 5207 |
id = MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(checksum); |
| 5208 |
else if (type == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) |
| 5209 |
id = checksum; |
| 5210 |
else |
| 5211 |
id = MultiMatchGenericcxx . . $ MultiMatchGeneric(4c679297bf94b9eb).(checksum); |
| 5212 |
|
| 5213 |
if (id == -1) { |
| 5214 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server data doesn't match!\n"); |
| 5215 |
MULTI_ASSERTcxx . . $ `Descent3/multi.cpp:1842:9`!(id != -1, "Server data doesn't match!"); |
| 5216 |
|
| 5217 |
if (type == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 5218 |
MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(checksum); |
| 5219 |
else if (type != OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) |
| 5220 |
MultiMatchGenericcxx . . $ MultiMatchGeneric(4c679297bf94b9eb).(checksum); |
| 5221 |
|
| 5222 |
return; |
| 5223 |
} else { |
| 5224 |
if (type != OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`! && type != OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) { |
| 5225 |
if (Object_infocxx . . $ Object_info.[id].typecxx . . $ object_info#type. != type) { |
| 5226 |
BailOnMultiplayercxx . . $ BailOnMultiplayer(85c52e162fed56f9).(TXT_MULTI_CORRUPTOBJcxx . . $ `Descent3/stringtable.h:611:9`!); |
| 5227 |
return; |
| 5228 |
} |
| 5229 |
} |
| 5230 |
} |
| 5231 |
|
| 5232 |
vectorcxx . . $ vector# pos, vel; |
| 5233 |
matrixcxx . . $ matrix# orient, *orientp = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 5234 |
|
| 5235 |
// Extract position |
| 5236 |
// memcpy (&pos,&data[count],sizeof(vector)); |
| 5237 |
// count+=sizeof(vector); |
| 5238 |
pos =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 5239 |
|
| 5240 |
// Extract velocity |
| 5241 |
// memcpy (&vel,&data[count],sizeof(vector)); |
| 5242 |
// count+=sizeof(vector); |
| 5243 |
vel =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 5244 |
|
| 5245 |
if (type != OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`! && type != OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!) { |
| 5246 |
// Extract orientation |
| 5247 |
uint16_tcxx . . $ uint16_t# p = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5248 |
uint16_tcxx . . $ uint16_t# h = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5249 |
uint16_tcxx . . $ uint16_t# b = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5250 |
|
| 5251 |
vm_AnglesToMatrixcxx . . $ vm_AnglesToMatrix(654fa9e3c9c3be99).(&orient, p, h, b); |
| 5252 |
orientp = &orient; |
| 5253 |
} |
| 5254 |
|
| 5255 |
// Get movement type |
| 5256 |
uint8_tcxx . . $ uint8_t# mtype = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5257 |
|
| 5258 |
// Get room/cell stuff |
| 5259 |
uint16_tcxx . . $ uint16_t# short_roomnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 5260 |
uint8_tcxx . . $ uint8_t# terrain = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5261 |
uint8_tcxx . . $ uint8_t# lifeleft = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 5262 |
int roomnum = short_roomnum; |
| 5263 |
|
| 5264 |
if (terrain) |
| 5265 |
roomnum = MAKE_ROOMNUMcxx . . $ `lib/object_external_struct.h:124:9`!(roomnum); |
| 5266 |
|
| 5267 |
int local_objnum; |
| 5268 |
|
| 5269 |
if (type != OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!) |
| 5270 |
local_objnum = ObjCreatecxx . . $ ObjCreate(849c3da80a4f387f).(type, id, roomnum, &pos, orientp, parent_handle); |
| 5271 |
else { |
| 5272 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(dummy_type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`! && dummy_type != OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!); |
| 5273 |
local_objnum = ObjCreatecxx . . $ ObjCreate(849c3da80a4f387f).(dummy_type, id, roomnum, &pos, orientp, parent_handle); |
| 5274 |
if (local_objnum >= 0) |
| 5275 |
ObjGhostObjectcxx . . $ ObjGhostObject(d4f767463ce0a6b3).(local_objnum); |
| 5276 |
} |
| 5277 |
|
| 5278 |
if (local_objnum < 0) { |
| 5279 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Ran out of objects!\n"); |
| 5280 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 5281 |
return; |
| 5282 |
} |
| 5283 |
|
| 5284 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[local_objnum]; |
| 5285 |
|
| 5286 |
if (obj->typecxx . . $ object#type. != OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 5287 |
obj->flagscxx . . $ object#flags. |= OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!; |
| 5288 |
obj->movement_typecxx . . $ object#movement_type. = mtype; |
| 5289 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). vel; |
| 5290 |
if (lifeleft != 255) { |
| 5291 |
obj->flagscxx . . $ object#flags. |= OF_USES_LIFELEFTcxx . . $ `Descent3/object_external.h:276:9`!; |
| 5292 |
obj->lifeleftcxx . . $ object#lifeleft. = lifeleft; |
| 5293 |
} |
| 5294 |
DemoWriteObjLifeLeftcxx . . $ DemoWriteObjLifeLeft(419c470199a90a97).(obj); |
| 5295 |
|
| 5296 |
obj->render_typecxx . . $ object#render_type. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5297 |
|
| 5298 |
if (obj->typecxx . . $ object#type. == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) { |
| 5299 |
// Get message if marker |
| 5300 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5301 |
memcpy(MarkerMessagescxx . . $ MarkerMessages.[obj->idcxx . . $ object#id.], &data[count], len); |
| 5302 |
count += len; |
| 5303 |
} |
| 5304 |
bool demo_record = false; |
| 5305 |
|
| 5306 |
if (Multi_Expect_demo_object_flagscxx . . $ Multi_Expect_demo_object_flags.) { |
| 5307 |
// if Multi_Expect_demo_object_flags is false that means that |
| 5308 |
// OEM 1.0 is the server and so it won't be packing this data at |
| 5309 |
// the end |
| 5310 |
demo_record = (MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count) == 0xBE) ? true : false; |
| 5311 |
} |
| 5312 |
|
| 5313 |
// Put it in our lists |
| 5314 |
if (obj->typecxx . . $ object#type. != OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) { |
| 5315 |
Local_object_listcxx . . $ Local_object_list.[local_objnum] = server_objnum; |
| 5316 |
Server_object_listcxx . . $ Server_object_list.[server_objnum] = local_objnum; |
| 5317 |
} |
| 5318 |
|
| 5319 |
if (announce) // Do effect to announce |
| 5320 |
{ |
| 5321 |
Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(7fd84bfdbf757f76).(SOUND_WALL_FADEcxx . . $ `Descent3/sounds.h:128:9`!, obj); |
| 5322 |
CreateRandomSparkscxx . . $ CreateRandomSparks(3e6b82e54d72ee3b).(20, &obj->poscxx . . $ object#pos., obj->roomnumcxx . . $ object#roomnum.); |
| 5323 |
|
| 5324 |
MultiAnnounceEffectcxx . . $ MultiAnnounceEffect(4359ca8c31d2d955).(obj, obj->sizecxx . . $ object#size. * 3, .7f); |
| 5325 |
} |
| 5326 |
|
| 5327 |
// Create the scripts for it |
| 5328 |
InitObjectScriptscxx . . $ InitObjectScripts(674fac047436fc5b).(&Objectscxx . . $ Objects.[local_objnum]); |
| 5329 |
|
| 5330 |
if (type == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) { |
| 5331 |
if (parent_handle == Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.) |
| 5332 |
Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].num_markerscxx . . $ player#num_markers.++; |
| 5333 |
} |
| 5334 |
|
| 5335 |
if (demo_record) { |
| 5336 |
obj->flagscxx . . $ object#flags. |= OF_CLIENTDEMOOBJECTcxx . . $ `Descent3/object_external.h:303:9`!; |
| 5337 |
|
| 5338 |
if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 5339 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Recording object created on server\n"); |
| 5340 |
// DemoWriteObjCreate(obj->type,obj->id,obj->roomnum,&obj->pos,&obj->orient,obj->parent_handle,obj); |
| 5341 |
} |
| 5342 |
} |
| 5343 |
|
| 5344 |
// mprintf(0,"MultiDoObject() Local objnum = %d\n",Server_object_list[server_objnum]); |
| 5345 |
} |
| 5346 |
|
| 5347 |
// Sends an object from the server to the client |
| 5348 |
void MultiSendObjectcxx . . $ MultiSendObject(d7354c60e612ede5).(objectcxx . . $ object# *obj, uint8_tcxx . . $ uint8_t# announce, uint8_tcxx . . $ uint8_t# demo_record) { |
| 5349 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 5350 |
|
| 5351 |
int count = 0; |
| 5352 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5353 |
int size_offset; |
| 5354 |
|
| 5355 |
if (obj->typecxx . . $ object#type. != OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 5356 |
obj->flagscxx . . $ object#flags. |= OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!; |
| 5357 |
|
| 5358 |
if (demo_record) |
| 5359 |
obj->flagscxx . . $ object#flags. |= OF_CLIENTDEMOOBJECTcxx . . $ `Descent3/object_external.h:303:9`!; |
| 5360 |
|
| 5361 |
// mprintf(0,"Telling clients to CREATE object %d type=%d\n",obj-Objects,obj->type); |
| 5362 |
|
| 5363 |
objectcxx . . $ object# *parent_obj = ObjGetUltimateParentcxx . . $ ObjGetUltimateParent(64a00b84ed3f82ee).(obj); |
| 5364 |
|
| 5365 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_OBJECTcxx . . $ `Descent3/multi.h:524:9`!, data, &count, 1); |
| 5366 |
|
| 5367 |
uint32_tcxx . . $ uint32_t# index = MultiGetMatchChecksumcxx . . $ MultiGetMatchChecksum(58c590d1186ea715).(obj->typecxx . . $ object#type., obj->idcxx . . $ object#id.); |
| 5368 |
|
| 5369 |
// Send server object number |
| 5370 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(announce, data, &count); |
| 5371 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(obj - Objectscxx . . $ Objects., data, &count); |
| 5372 |
|
| 5373 |
// Add parent |
| 5374 |
if (obj->parent_handlecxx . . $ object#parent_handle. == OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) |
| 5375 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(65535, data, &count); |
| 5376 |
else |
| 5377 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).((obj->parent_handlecxx . . $ object#parent_handle. & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!), data, &count); // Add parent |
| 5378 |
|
| 5379 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(obj->typecxx . . $ object#type., data, &count); |
| 5380 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(index, data, &count); |
| 5381 |
// If it's a ghost object (type==OBJ_DUMMY) send it's old type |
| 5382 |
if (obj->typecxx . . $ object#type. == OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!) |
| 5383 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(obj->dummy_typecxx . . $ object#dummy_type., data, &count); |
| 5384 |
|
| 5385 |
// Send position |
| 5386 |
// memcpy (&data[count],&obj->pos,sizeof(vector)); |
| 5387 |
// count+=sizeof(vector); |
| 5388 |
MultiAddVectorcxx . . $ MultiAddVector(f5e3e9791ffe6d9f).(obj->poscxx . . $ object#pos., data, &count); |
| 5389 |
|
| 5390 |
// Send velocity |
| 5391 |
// memcpy (&data[count],&obj->mtype.phys_info.velocity,sizeof(vector)); |
| 5392 |
// count+=sizeof(vector); |
| 5393 |
MultiAddVectorcxx . . $ MultiAddVector(f5e3e9791ffe6d9f).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity., data, &count); |
| 5394 |
|
| 5395 |
if (obj->typecxx . . $ object#type. != OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`! && obj->typecxx . . $ object#type. != OBJ_DUMMYcxx . . $ `Descent3/object_external.h:181:9`!) { |
| 5396 |
// Send over orientation |
| 5397 |
angveccxx . . $ angvec# angs; |
| 5398 |
vm_ExtractAnglesFromMatrixcxx . . $ vm_ExtractAnglesFromMatrix(5f9a6d6f613ae256).(&angs, &obj->orientcxx . . $ object#orient.); |
| 5399 |
|
| 5400 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.pcxx . . $ angvec#p., data, &count); |
| 5401 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.hcxx . . $ angvec#h., data, &count); |
| 5402 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.bcxx . . $ angvec#b., data, &count); |
| 5403 |
} |
| 5404 |
|
| 5405 |
// Send movement type |
| 5406 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(obj->movement_typecxx . . $ object#movement_type., data, &count); |
| 5407 |
|
| 5408 |
// Send room number and terrain flag |
| 5409 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(obj->roomnum), data, &count); |
| 5410 |
|
| 5411 |
if (OBJECT_OUTSIDEcxx . . $ `lib/object_external_struct.h:130:9`!(obj)) |
| 5412 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(1, data, &count); |
| 5413 |
else |
| 5414 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(0, data, &count); |
| 5415 |
|
| 5416 |
if (obj->flagscxx . . $ object#flags. & OF_USES_LIFELEFTcxx . . $ `Descent3/object_external.h:276:9`!) { |
| 5417 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(obj->lifeleft < 255); |
| 5418 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(obj->lifeleftcxx . . $ object#lifeleft., data, &count); |
| 5419 |
} else |
| 5420 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(255, data, &count); |
| 5421 |
|
| 5422 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(obj->render_typecxx . . $ object#render_type., data, &count); |
| 5423 |
|
| 5424 |
if (obj->typecxx . . $ object#type. == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) { |
| 5425 |
// Add marker message to the end of this |
| 5426 |
uint8_tcxx . . $ uint8_t# len = strlen(MarkerMessagescxx . . $ MarkerMessages.[obj->idcxx . . $ object#id.]) + 1; |
| 5427 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, data, &count); |
| 5428 |
memcpy(data + count, MarkerMessagescxx . . $ MarkerMessages.[obj->idcxx . . $ object#id.], len); |
| 5429 |
count += len; |
| 5430 |
} |
| 5431 |
|
| 5432 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).((demo_record) ? 0xBE : 0, data, &count); |
| 5433 |
|
| 5434 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5435 |
|
| 5436 |
if (announce) // Do effect to announce |
| 5437 |
{ |
| 5438 |
Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(7fd84bfdbf757f76).(SOUND_WALL_FADEcxx . . $ `Descent3/sounds.h:128:9`!, obj); |
| 5439 |
CreateRandomSparkscxx . . $ CreateRandomSparks(3e6b82e54d72ee3b).(20, &obj->poscxx . . $ object#pos., obj->roomnumcxx . . $ object#roomnum.); |
| 5440 |
|
| 5441 |
MultiAnnounceEffectcxx . . $ MultiAnnounceEffect(4359ca8c31d2d955).(obj, obj->sizecxx . . $ object#size. * 3, .7f); |
| 5442 |
} |
| 5443 |
// mprintf(0,"Sending object %d to clients.\n",OBJNUM(obj)); |
| 5444 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, true); |
| 5445 |
} |
| 5446 |
|
| 5447 |
void MultiDoGuidedInfocxx . . $ MultiDoGuidedInfo(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5448 |
int count = 0; |
| 5449 |
|
| 5450 |
// Skip header stuff |
| 5451 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5452 |
|
| 5453 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5454 |
uint8_tcxx . . $ uint8_t# release = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5455 |
|
| 5456 |
if (Playerscxx . . $ Players.[slot].guided_objcxx . . $ player#guided_obj. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) |
| 5457 |
return; |
| 5458 |
|
| 5459 |
objectcxx . . $ object# *obj = Playerscxx . . $ Players.[slot].guided_objcxx . . $ player#guided_obj.; |
| 5460 |
|
| 5461 |
vectorcxx . . $ vector# pos; |
| 5462 |
matrixcxx . . $ matrix# orient; |
| 5463 |
uint16_tcxx . . $ uint16_t# short_roomnum; |
| 5464 |
int roomnum; |
| 5465 |
|
| 5466 |
MultiExtractPositionDatacxx . . $ MultiExtractPositionData(960cd16f6e188b41).(&pos, data, &count); |
| 5467 |
|
| 5468 |
// Get orientation |
| 5469 |
uint16_tcxx . . $ uint16_t# p = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5470 |
uint16_tcxx . . $ uint16_t# h = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5471 |
uint16_tcxx . . $ uint16_t# b = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5472 |
|
| 5473 |
vm_AnglesToMatrixcxx . . $ vm_AnglesToMatrix(654fa9e3c9c3be99).(&orient, p, h, b); |
| 5474 |
|
| 5475 |
// Get room and terrain flag |
| 5476 |
short_roomnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 5477 |
uint8_tcxx . . $ uint8_t# terrain = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5478 |
|
| 5479 |
roomnum = short_roomnum; |
| 5480 |
if (terrain) |
| 5481 |
roomnum = MAKE_ROOMNUMcxx . . $ `lib/object_external_struct.h:124:9`!(roomnum); |
| 5482 |
|
| 5483 |
// Get velocity |
| 5484 |
vectorcxx . . $ vector# vel; |
| 5485 |
vel.xcxx . . $ vector#x. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 5486 |
vel.ycxx . . $ vector#y. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 5487 |
vel.zcxx . . $ vector#z. = ((float)MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count)) / 128.0; |
| 5488 |
|
| 5489 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). vel; |
| 5490 |
|
| 5491 |
ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &pos, roomnum, &orient, false); |
| 5492 |
|
| 5493 |
if (release) |
| 5494 |
ReleaseGuidedMissilecxx . . $ ReleaseGuidedMissile(d4f767463ce0a6b3).(slot); |
| 5495 |
} |
| 5496 |
|
| 5497 |
// Stuff info for a guided missile |
| 5498 |
int MultiStuffGuidedInfocxx . . $ MultiStuffGuidedInfo(b2cc8657ba51080d).(int slot, uint8_tcxx . . $ uint8_t# *data) { |
| 5499 |
int count = 0; |
| 5500 |
int size_offset; |
| 5501 |
objectcxx . . $ object# *obj = Playerscxx . . $ Players.[slot].guided_objcxx . . $ player#guided_obj.; |
| 5502 |
|
| 5503 |
if (Playerscxx . . $ Players.[slot].guided_objcxx . . $ player#guided_obj. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) |
| 5504 |
return 0; |
| 5505 |
|
| 5506 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_GUIDED_INFOcxx . . $ `Descent3/multi.h:559:9`!, data, &count); |
| 5507 |
|
| 5508 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 5509 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(0, data, &count); |
| 5510 |
|
| 5511 |
// Do position |
| 5512 |
MultiAddPositionDatacxx . . $ MultiAddPositionData(960cd16f6e188b41).(&obj->poscxx . . $ object#pos., data, &count); |
| 5513 |
|
| 5514 |
// Do orientation |
| 5515 |
angveccxx . . $ angvec# angs; |
| 5516 |
vm_ExtractAnglesFromMatrixcxx . . $ vm_ExtractAnglesFromMatrix(5f9a6d6f613ae256).(&angs, &obj->orientcxx . . $ object#orient.); |
| 5517 |
|
| 5518 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.pcxx . . $ angvec#p., data, &count); |
| 5519 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.hcxx . . $ angvec#h., data, &count); |
| 5520 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.bcxx . . $ angvec#b., data, &count); |
| 5521 |
|
| 5522 |
// Do roomnumber and terrain flag |
| 5523 |
|
| 5524 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(obj->roomnum), data, &count); |
| 5525 |
|
| 5526 |
if (OBJECT_OUTSIDEcxx . . $ `lib/object_external_struct.h:130:9`!(obj)) |
| 5527 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(1, data, &count); |
| 5528 |
else |
| 5529 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(0, data, &count); |
| 5530 |
|
| 5531 |
// Do velocity |
| 5532 |
vectorcxx . . $ vector# *vel = &obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity.; |
| 5533 |
vectorcxx . . $ vector# *rotvel = &obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel.; |
| 5534 |
|
| 5535 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(vel->xcxx . . $ vector#x. * 128.0, data, &count); |
| 5536 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(vel->ycxx . . $ vector#y. * 128.0, data, &count); |
| 5537 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(vel->zcxx . . $ vector#z. * 128.0, data, &count); |
| 5538 |
|
| 5539 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5540 |
|
| 5541 |
return count; |
| 5542 |
} |
| 5543 |
|
| 5544 |
// Guided missile release |
| 5545 |
void MultiDoMissileReleasecxx . . $ MultiDoMissileRelease(ea2b65c19bfee284).(int slot, uint8_tcxx . . $ uint8_t# *data) { |
| 5546 |
// if we are the server, we'll have to forward this packet to the clients |
| 5547 |
int count = 0; |
| 5548 |
uint8_tcxx . . $ uint8_t# pnum_release; |
| 5549 |
|
| 5550 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5551 |
|
| 5552 |
bool is_guided = false; |
| 5553 |
pnum_release = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 5554 |
if (pnum_release & 0x80) { |
| 5555 |
pnum_release &= ~0x80; |
| 5556 |
is_guided = true; |
| 5557 |
} |
| 5558 |
|
| 5559 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 5560 |
// verify that slot and player match up |
| 5561 |
if (pnum_release != slot) { |
| 5562 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "%s Release: Packet pnum does not match real pnum\n", (is_guided) ? "Guided" : "Timeout"); |
| 5563 |
return; |
| 5564 |
} |
| 5565 |
|
| 5566 |
// relay the packet to the clients |
| 5567 |
MultiSendMissileReleasecxx . . $ MultiSendMissileRelease(918ebd27a9ddbad3).(pnum_release, is_guided); |
| 5568 |
|
| 5569 |
// actually perform the guided release |
| 5570 |
if (is_guided) |
| 5571 |
ReleaseGuidedMissilecxx . . $ ReleaseGuidedMissile(d4f767463ce0a6b3).(pnum_release); |
| 5572 |
else |
| 5573 |
ReleaseUserTimeoutMissilecxx . . $ ReleaseUserTimeoutMissile(d4f767463ce0a6b3).(pnum_release); |
| 5574 |
} else { |
| 5575 |
// make sure we got this packet from the server |
| 5576 |
if (slot != 0) { |
| 5577 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "%s Release: got packet from non-server!?!\n", (is_guided) ? "Guided" : "Timeout"); |
| 5578 |
return; |
| 5579 |
} |
| 5580 |
|
| 5581 |
// actually perform the guided release |
| 5582 |
if (is_guided) |
| 5583 |
ReleaseGuidedMissilecxx . . $ ReleaseGuidedMissile(d4f767463ce0a6b3).(pnum_release); |
| 5584 |
else |
| 5585 |
ReleaseUserTimeoutMissilecxx . . $ ReleaseUserTimeoutMissile(d4f767463ce0a6b3).(pnum_release); |
| 5586 |
} |
| 5587 |
} |
| 5588 |
|
| 5589 |
void MultiSendMissileReleasecxx . . $ MultiSendMissileRelease(918ebd27a9ddbad3).(int slot, bool is_guided) { |
| 5590 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(slot >= 0 && slot < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!); |
| 5591 |
|
| 5592 |
if (!(NetPlayerscxx . . $ NetPlayers.[slot].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) || NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence. != NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) |
| 5593 |
return; // hey this player isn't in the game |
| 5594 |
|
| 5595 |
if (is_guided && Playerscxx . . $ Players.[slot].guided_objcxx . . $ player#guided_obj. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) |
| 5596 |
return; // no guided missile for this player |
| 5597 |
if (!is_guided && Playerscxx . . $ Players.[slot].user_timeout_objcxx . . $ player#user_timeout_obj. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) |
| 5598 |
return; // no user timeout object |
| 5599 |
|
| 5600 |
// everything looks ok, fire off this packet |
| 5601 |
int count = 0; |
| 5602 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5603 |
int size_offset; |
| 5604 |
|
| 5605 |
uint8_tcxx . . $ uint8_t# byte_to_send; |
| 5606 |
byte_to_send = slot; |
| 5607 |
if (is_guided) |
| 5608 |
byte_to_send |= 0x80; |
| 5609 |
|
| 5610 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_MISSILE_RELEASEcxx . . $ `Descent3/multi.h:646:9`!, data, &count, 1); |
| 5611 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(byte_to_send, data, &count); |
| 5612 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5613 |
|
| 5614 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 5615 |
int i; |
| 5616 |
|
| 5617 |
// tell all the clients (except the player who is releasing) |
| 5618 |
for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 5619 |
if (i == Player_numcxx . . $ Player_num.) |
| 5620 |
continue; |
| 5621 |
if (i == slot) |
| 5622 |
continue; |
| 5623 |
|
| 5624 |
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`!)) { |
| 5625 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[i].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, true); |
| 5626 |
} |
| 5627 |
} |
| 5628 |
} else { |
| 5629 |
// tell the server |
| 5630 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, true); |
| 5631 |
} |
| 5632 |
} |
| 5633 |
|
| 5634 |
// Calls the scripts packet extractor code |
| 5635 |
void MultiDoSpecialPacketcxx . . $ MultiDoSpecialPacket(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5636 |
int count = 0; |
| 5637 |
uint8_tcxx . . $ uint8_t# indata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5638 |
|
| 5639 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5640 |
int size = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 5641 |
|
| 5642 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(size < MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!); |
| 5643 |
memcpy(indata, &data[count], size); |
| 5644 |
|
| 5645 |
DLLInfocxx . . $ DLLInfo..special_datacxx . . $ dllinfo#special_data. = indata; |
| 5646 |
CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(EVT_CLIENT_GAMESPECIALPACKETcxx . . $ `lib/d3events.h:103:9`!, &DLLInfocxx . . $ DLLInfo.); |
| 5647 |
} |
| 5648 |
|
| 5649 |
// Sends the special script packet to a player |
| 5650 |
void MultiSendSpecialPacketcxx . . $ MultiSendSpecialPacket(dde21517a502ab05).(int slot, uint8_tcxx . . $ uint8_t# *outdata, int size) { |
| 5651 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 5652 |
|
| 5653 |
int count = 0; |
| 5654 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5655 |
int size_offset; |
| 5656 |
|
| 5657 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_SPECIAL_PACKETcxx . . $ `Descent3/multi.h:556:9`!, data, &count, 1); |
| 5658 |
|
| 5659 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(size, data, &count); |
| 5660 |
|
| 5661 |
// Send special packet data |
| 5662 |
memcpy(&data[count], outdata, size); |
| 5663 |
count += size; |
| 5664 |
|
| 5665 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5666 |
|
| 5667 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[slot].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, true); |
| 5668 |
} |
| 5669 |
|
| 5670 |
// Sends the special script packet to the server |
| 5671 |
void MultiClientSendSpecialPacketcxx . . $ MultiClientSendSpecialPacket(fc0f0e1646c32816).(uint8_tcxx . . $ uint8_t# *outdata, int size) { |
| 5672 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 5673 |
|
| 5674 |
int count = 0; |
| 5675 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5676 |
int size_offset; |
| 5677 |
|
| 5678 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_SPECIAL_PACKETcxx . . $ `Descent3/multi.h:556:9`!, data, &count); |
| 5679 |
|
| 5680 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(size, data, &count); |
| 5681 |
|
| 5682 |
// Send special packet data |
| 5683 |
memcpy(&data[count], outdata, size); |
| 5684 |
count += size; |
| 5685 |
|
| 5686 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5687 |
|
| 5688 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 5689 |
} |
| 5690 |
|
| 5691 |
// Server is telling us to remove an object |
| 5692 |
void MultiDoRemoveObjectcxx . . $ MultiDoRemoveObject(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5693 |
int count = 0; |
| 5694 |
|
| 5695 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5696 |
|
| 5697 |
uint16_tcxx . . $ uint16_t# server_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 5698 |
uint8_tcxx . . $ uint8_t# type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5699 |
|
| 5700 |
uint8_tcxx . . $ uint8_t# sound = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5701 |
|
| 5702 |
// Get name to help track down bug |
| 5703 |
/*#ifndef RELEASE |
| 5704 |
char name[255]; |
| 5705 |
uint8_t len=MultiGetByte (data,&count); |
| 5706 |
memcpy (name,&data[count],len); |
| 5707 |
count+=len; |
| 5708 |
#endif*/ |
| 5709 |
|
| 5710 |
// mprintf(0,"Server says to remove object %d\n",server_objnum); |
| 5711 |
|
| 5712 |
int local_objnum = Server_object_listcxx . . $ Server_object_list.[server_objnum]; |
| 5713 |
if (local_objnum == 65535) { |
| 5714 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client/Server object lists don't match. Something is wrong!\n"); |
| 5715 |
// Error ("Bad object 1"); |
| 5716 |
return; |
| 5717 |
} |
| 5718 |
|
| 5719 |
if (!(Objectscxx . . $ Objects.[local_objnum].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!)) { |
| 5720 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client/Server object lists don't match. Something is wrong!\n"); |
| 5721 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(1); |
| 5722 |
Objectscxx . . $ Objects.[local_objnum].flagscxx . . $ object#flags. |= OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!; |
| 5723 |
} |
| 5724 |
/* |
| 5725 |
if (Objects[local_objnum].type != type) { |
| 5726 |
mprintf(0, "Client/Server object types don't match. Something is wrong!\n"); |
| 5727 |
// mprintf (0,"Object to be removed was type %d, I thought it was %d name: |
| 5728 |
// %s\n",type,Objects[local_objnum].type,name)); Error ("Bad object 2"); ASSERT (1); return; |
| 5729 |
} |
| 5730 |
*/ |
| 5731 |
if (sound) |
| 5732 |
Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(7fd84bfdbf757f76).(SOUND_POWERUP_PICKUPcxx . . $ `Descent3/sounds.h:116:9`!, &Objectscxx . . $ Objects.[local_objnum]); |
| 5733 |
|
| 5734 |
if (Objectscxx . . $ Objects.[local_objnum].flagscxx . . $ object#flags. & OF_CLIENTDEMOOBJECTcxx . . $ `Descent3/object_external.h:303:9`!) { |
| 5735 |
if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 5736 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Recording object deleted on server\n"); |
| 5737 |
DemoWriteSetObjDeadcxx . . $ DemoWriteSetObjDead(419c470199a90a97).(&Objectscxx . . $ Objects.[local_objnum]); |
| 5738 |
} |
| 5739 |
} |
| 5740 |
|
| 5741 |
Objectscxx . . $ Objects.[local_objnum].flagscxx . . $ object#flags. |= OF_SERVER_SAYS_DELETEcxx . . $ `Descent3/object_external.h:290:9`!; |
| 5742 |
SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(&Objectscxx . . $ Objects.[local_objnum]); |
| 5743 |
|
| 5744 |
// Clear our lists |
| 5745 |
int this_server_objnum = Local_object_listcxx . . $ Local_object_list.[local_objnum]; |
| 5746 |
if (this_server_objnum != server_objnum) |
| 5747 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(1); // Error ("Client object doesn't match remove object!"); |
| 5748 |
|
| 5749 |
Server_object_listcxx . . $ Server_object_list.[server_objnum] = 65535; |
| 5750 |
Local_object_listcxx . . $ Local_object_list.[local_objnum] = 65535; |
| 5751 |
|
| 5752 |
if (Objectscxx . . $ Objects.[local_objnum].typecxx . . $ object#type. == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!) { |
| 5753 |
if (Objectscxx . . $ Objects.[local_objnum].parent_handlecxx . . $ object#parent_handle. == Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.) |
| 5754 |
Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].num_markerscxx . . $ player#num_markers.--; |
| 5755 |
} |
| 5756 |
} |
| 5757 |
|
| 5758 |
// Tells all clients to remove a specified object |
| 5759 |
void MultiSendRemoveObjectcxx . . $ MultiSendRemoveObject(eb56a3b53eea6ace).(objectcxx . . $ object# *obj, uint8_tcxx . . $ uint8_t# playsound) { |
| 5760 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 5761 |
|
| 5762 |
int count = 0; |
| 5763 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5764 |
int size_offset; |
| 5765 |
|
| 5766 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REMOVE_OBJECTcxx . . $ `Descent3/multi.h:558:9`!, data, &count, 1); |
| 5767 |
|
| 5768 |
// mprintf(0,"Telling clients to remove object %d type=%d |
| 5769 |
// name=%s\n",obj-Objects,obj->type,Object_info[obj->id].name); |
| 5770 |
|
| 5771 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(obj->flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 5772 |
|
| 5773 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(obj - Objectscxx . . $ Objects., data, &count); |
| 5774 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(obj->typecxx . . $ object#type., data, &count); |
| 5775 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(playsound, data, &count); |
| 5776 |
|
| 5777 |
/*#ifndef RELEASE |
| 5778 |
uint8_t len = strlen(Object_info[obj->id].name)+1; |
| 5779 |
MultiAddByte (len,data,&count); |
| 5780 |
memcpy (data+count,Object_info[obj->id].name,len); |
| 5781 |
count+=len; |
| 5782 |
#endif*/ |
| 5783 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5784 |
|
| 5785 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, false); |
| 5786 |
} |
| 5787 |
|
| 5788 |
// Repositions a powerup to be where it should be |
| 5789 |
void MultiDoPowerupRepositioncxx . . $ MultiDoPowerupReposition(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5790 |
int count = 0; |
| 5791 |
|
| 5792 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5793 |
|
| 5794 |
int server_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 5795 |
|
| 5796 |
int local_objnum = Server_object_listcxx . . $ Server_object_list.[server_objnum]; |
| 5797 |
if (local_objnum == 65535) { |
| 5798 |
return; // Powerup hasn't been born yet |
| 5799 |
} |
| 5800 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Objects[local_objnum].type == OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!); |
| 5801 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[local_objnum]; |
| 5802 |
vectorcxx . . $ vector# pos; |
| 5803 |
|
| 5804 |
// memcpy (&pos,&data[count],sizeof(vector)); |
| 5805 |
// count+=sizeof(vector); |
| 5806 |
pos =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 5807 |
|
| 5808 |
uint16_tcxx . . $ uint16_t# short_roomnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 5809 |
uint8_tcxx . . $ uint8_t# terrain = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5810 |
|
| 5811 |
int roomnum = short_roomnum; |
| 5812 |
if (terrain) |
| 5813 |
roomnum = MAKE_ROOMNUMcxx . . $ `lib/object_external_struct.h:124:9`!(roomnum); |
| 5814 |
|
| 5815 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 5816 |
|
| 5817 |
ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &pos, roomnum, &obj->orientcxx . . $ object#orient., true); |
| 5818 |
} |
| 5819 |
|
| 5820 |
// Client is telling us about weapons and energy he has |
| 5821 |
void MultiDoWeaponsLoadcxx . . $ MultiDoWeaponsLoad(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5822 |
int count = 0; |
| 5823 |
|
| 5824 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5825 |
|
| 5826 |
int slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5827 |
|
| 5828 |
for (int i = 0; i < MAX_SECONDARY_WEAPONScxx . . $ `Descent3/weapon.h:203:9`!; i++) { |
| 5829 |
int num = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 5830 |
|
| 5831 |
if (num < Playerscxx . . $ Players.[slot].weapon_ammocxx . . $ player#weapon_ammo.[MAX_PRIMARY_WEAPONScxx . . $ `Descent3/weapon.h:202:9`! + i]) |
| 5832 |
Playerscxx . . $ Players.[slot].weapon_ammocxx . . $ player#weapon_ammo.[MAX_PRIMARY_WEAPONScxx . . $ `Descent3/weapon.h:202:9`! + i] = num; |
| 5833 |
} |
| 5834 |
|
| 5835 |
// Now get small views |
| 5836 |
int objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5837 |
if (objnum == -1) |
| 5838 |
Playerscxx . . $ Players.[slot].small_left_objcxx . . $ player#small_left_obj. = -1; |
| 5839 |
else |
| 5840 |
Playerscxx . . $ Players.[slot].small_left_objcxx . . $ player#small_left_obj. = objnum; |
| 5841 |
|
| 5842 |
objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5843 |
|
| 5844 |
if (objnum == -1) |
| 5845 |
Playerscxx . . $ Players.[slot].small_right_objcxx . . $ player#small_right_obj. = -1; |
| 5846 |
else |
| 5847 |
Playerscxx . . $ Players.[slot].small_right_objcxx . . $ player#small_right_obj. = objnum; |
| 5848 |
|
| 5849 |
Playerscxx . . $ Players.[slot].small_dll_objcxx . . $ player#small_dll_obj. = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 5850 |
} |
| 5851 |
|
| 5852 |
// Tells the server about the weapons we're carrying |
| 5853 |
// Plus about the viewers we're looking at |
| 5854 |
void MultiSendWeaponsLoadcxx . . $ MultiSendWeaponsLoad(49f6e7a06ebc5aa8).() { |
| 5855 |
int count = 0; |
| 5856 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5857 |
|
| 5858 |
int size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_WEAPONS_LOADcxx . . $ `Descent3/multi.h:617:9`!, data, &count); |
| 5859 |
|
| 5860 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 5861 |
|
| 5862 |
for (int i = 0; i < (MAX_SECONDARY_WEAPONScxx . . $ `Descent3/weapon.h:203:9`!); i++) { |
| 5863 |
int num = Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].weapon_ammocxx . . $ player#weapon_ammo.[MAX_PRIMARY_WEAPONScxx . . $ `Descent3/weapon.h:202:9`! + i]; |
| 5864 |
num = stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(num, 255); |
| 5865 |
|
| 5866 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(num, data, &count); |
| 5867 |
} |
| 5868 |
|
| 5869 |
// Add small view objnums in case we're looking through someone elses eyes |
| 5870 |
objectcxx . . $ object# *obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(GetSmallViewercxx . . $ GetSmallViewer(7864480464b09eea).(SVW_LEFTcxx . . $ `Descent3/SmallViews.h:72:9`!)); |
| 5871 |
if (!obj || obj->typecxx . . $ object#type. == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 5872 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(-1, data, &count); |
| 5873 |
else |
| 5874 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(Local_object_listcxx . . $ Local_object_list.[GetSmallViewercxx . . $ GetSmallViewer(7864480464b09eea).(SVW_LEFTcxx . . $ `Descent3/SmallViews.h:72:9`!) & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!], data, &count); |
| 5875 |
|
| 5876 |
obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(GetSmallViewercxx . . $ GetSmallViewer(7864480464b09eea).(SVW_RIGHTcxx . . $ `Descent3/SmallViews.h:74:9`!)); |
| 5877 |
if (!obj || obj->typecxx . . $ object#type. == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) |
| 5878 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(-1, data, &count); |
| 5879 |
else |
| 5880 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(Local_object_listcxx . . $ Local_object_list.[GetSmallViewercxx . . $ GetSmallViewer(7864480464b09eea).(SVW_RIGHTcxx . . $ `Descent3/SmallViews.h:74:9`!) & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!], data, &count); |
| 5881 |
|
| 5882 |
if (Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].small_dll_objcxx . . $ player#small_dll_obj. == -1) |
| 5883 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(-1, data, &count); |
| 5884 |
else |
| 5885 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(Local_object_listcxx . . $ Local_object_list.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].small_dll_objcxx . . $ player#small_dll_obj.], data, &count); |
| 5886 |
|
| 5887 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5888 |
|
| 5889 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&Netgamecxx . . $ Netgame..server_addresscxx . . $ netgame_info#server_address., data, count, 0); |
| 5890 |
} |
| 5891 |
|
| 5892 |
// Tells the other players that a slot is starting/stopping its on/off weapon |
| 5893 |
void MultiSendOnOffcxx . . $ MultiSendOnOff(c7bf941c66bd2814).(objectcxx . . $ object# *obj, uint8_tcxx . . $ uint8_t# on, uint8_tcxx . . $ uint8_t# wb_index, uint8_tcxx . . $ uint8_t# fire_mask) { |
| 5894 |
int count = 0; |
| 5895 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5896 |
int size_offset; |
| 5897 |
int slot = obj->idcxx . . $ object#id.; |
| 5898 |
|
| 5899 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ON_OFFcxx . . $ `Descent3/multi.h:571:9`!, data, &count); |
| 5900 |
|
| 5901 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 5902 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(on, data, &count); |
| 5903 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(wb_index, data, &count); |
| 5904 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(fire_mask, data, &count); |
| 5905 |
|
| 5906 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5907 |
|
| 5908 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 5909 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, false); |
| 5910 |
} |
| 5911 |
|
| 5912 |
// Server is telling us to start/stop and on/off weapon |
| 5913 |
void MultiDoOnOffcxx . . $ MultiDoOnOff(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5914 |
int count = 0; |
| 5915 |
|
| 5916 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5917 |
|
| 5918 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5919 |
uint8_tcxx . . $ uint8_t# on = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5920 |
uint8_tcxx . . $ uint8_t# wb_index = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5921 |
uint8_tcxx . . $ uint8_t# fire_mask = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5922 |
|
| 5923 |
if (on) { |
| 5924 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. |= WFF_ON_OFFcxx . . $ `Descent3/player_external.h:104:9`!; |
| 5925 |
|
| 5926 |
// Clear out firing mask |
| 5927 |
dynamic_wb_infocxx . . $ dynamic_wb_info# *p_dwb = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].dynamic_wbcxx . . $ object#dynamic_wb.[wb_index]; |
| 5928 |
p_dwb->cur_firing_maskcxx . . $ dynamic_wb_info#cur_firing_mask. = 0; |
| 5929 |
|
| 5930 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!].indexcxx . . $ player_weapon#index. = wb_index; |
| 5931 |
} else |
| 5932 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. &= ~WFF_ON_OFFcxx . . $ `Descent3/player_external.h:104:9`!; |
| 5933 |
|
| 5934 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 5935 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, false); |
| 5936 |
if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 5937 |
DemoWriteObjWeapFireFlagChangedcxx . . $ DemoWriteObjWeapFireFlagChanged(68e3ae50fe6578a9).(Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.); |
| 5938 |
} |
| 5939 |
} |
| 5940 |
|
| 5941 |
// Tells all the clients to apply damage to a player |
| 5942 |
void MultiSendAdditionalDamagecxx . . $ MultiSendAdditionalDamage(c2f439e40e2f19ed).(int slot, int type, float amount) { |
| 5943 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 5944 |
int count = 0; |
| 5945 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5946 |
int size_offset; |
| 5947 |
|
| 5948 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ADDITIONAL_DAMAGEcxx . . $ `Descent3/multi.h:572:9`!, data, &count, 1); |
| 5949 |
|
| 5950 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 5951 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(type, data, &count); |
| 5952 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(amount, data, &count); |
| 5953 |
|
| 5954 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 5955 |
|
| 5956 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending additional damage packet of type=%d amount=%f!\n", type, amount); |
| 5957 |
|
| 5958 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, false); |
| 5959 |
} |
| 5960 |
|
| 5961 |
// Server is telling us to apply damage to a player |
| 5962 |
void MultiDoAdditionalDamagecxx . . $ MultiDoAdditionalDamage(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 5963 |
int count = 0; |
| 5964 |
|
| 5965 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!); |
| 5966 |
|
| 5967 |
// mprintf(0,"Got additional damage packet!\n"); |
| 5968 |
|
| 5969 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 5970 |
|
| 5971 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5972 |
uint8_tcxx . . $ uint8_t# type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 5973 |
float amount = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 5974 |
|
| 5975 |
if (amount < 0) // add to shields |
| 5976 |
{ |
| 5977 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].shieldscxx . . $ object#shields. += (-amount); |
| 5978 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].shieldscxx . . $ object#shields. > MAX_SHIELDScxx . . $ `Descent3/player_external.h:72:9`!) |
| 5979 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].shieldscxx . . $ object#shields. = MAX_SHIELDScxx . . $ `Descent3/player_external.h:72:9`!; |
| 5980 |
} else // take damage |
| 5981 |
{ |
| 5982 |
ApplyDamageToPlayercxx . . $ ApplyDamageToPlayer(1fbfa7277d8ac7b4).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.], NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!, type, amount, 1); |
| 5983 |
} |
| 5984 |
} |
| 5985 |
|
| 5986 |
// Asks the server for shields based on frametime "amount" x the type of shields requested |
| 5987 |
void MultiSendRequestShieldscxx . . $ MultiSendRequestShields(43c79ee2f1b9aefe).(int type, float amount) { |
| 5988 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) |
| 5989 |
return; |
| 5990 |
|
| 5991 |
int count = 0; |
| 5992 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 5993 |
int size_offset; |
| 5994 |
|
| 5995 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_SHIELDScxx . . $ `Descent3/multi.h:608:9`!, data, &count); |
| 5996 |
|
| 5997 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 5998 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(type, data, &count); |
| 5999 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(amount, data, &count); |
| 6000 |
|
| 6001 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 6002 |
|
| 6003 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 6004 |
} |
| 6005 |
|
| 6006 |
// Someone wants us to give them shields |
| 6007 |
void MultiDoRequestShieldscxx . . $ MultiDoRequestShields(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6008 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 6009 |
return; |
| 6010 |
|
| 6011 |
int count = 0; |
| 6012 |
|
| 6013 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6014 |
|
| 6015 |
uint8_tcxx . . $ uint8_t# pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6016 |
uint8_tcxx . . $ uint8_t# type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6017 |
float amount = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6018 |
|
| 6019 |
if (type == SHIELD_REQUEST_ENERGY_TO_SHIELDcxx . . $ `Descent3/multi.h:652:9`!) { |
| 6020 |
// This guys wants to use the energy to shield converter |
| 6021 |
|
| 6022 |
float amount_to_give; |
| 6023 |
|
| 6024 |
amount_to_give = (amount * CONVERTER_RATEcxx . . $ `Descent3/player.h:386:9`!) / CONVERTER_SCALEcxx . . $ `Descent3/player.h:387:9`!; |
| 6025 |
|
| 6026 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.].shieldscxx . . $ object#shields. + amount_to_give > INITIAL_SHIELDScxx . . $ `Descent3/player_external.h:69:9`!) |
| 6027 |
amount_to_give = INITIAL_SHIELDScxx . . $ `Descent3/player_external.h:69:9`! - Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.].shieldscxx . . $ object#shields.; |
| 6028 |
|
| 6029 |
if (amount_to_give > 0) { |
| 6030 |
Multi_additional_damagecxx . . $ Multi_additional_damage.[pnum] = -amount_to_give; |
| 6031 |
Multi_additional_damage_typecxx . . $ Multi_additional_damage_type.[pnum] = PD_NONEcxx . . $ `Descent3/damage_external.h:23:9`!; |
| 6032 |
} |
| 6033 |
} |
| 6034 |
} |
| 6035 |
|
| 6036 |
// We're asking the server to damage us |
| 6037 |
void MultiSendRequestDamagecxx . . $ MultiSendRequestDamage(43c79ee2f1b9aefe).(int type, float amount) { |
| 6038 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) |
| 6039 |
return; |
| 6040 |
|
| 6041 |
int count = 0; |
| 6042 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6043 |
int size_offset; |
| 6044 |
|
| 6045 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_DAMAGEcxx . . $ `Descent3/multi.h:607:9`!, data, &count); |
| 6046 |
|
| 6047 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 6048 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(type, data, &count); |
| 6049 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(amount, data, &count); |
| 6050 |
|
| 6051 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 6052 |
|
| 6053 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 6054 |
} |
| 6055 |
|
| 6056 |
// Someone wants us to damage them |
| 6057 |
void MultiDoRequestDamagecxx . . $ MultiDoRequestDamage(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6058 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 6059 |
return; |
| 6060 |
|
| 6061 |
int count = 0; |
| 6062 |
|
| 6063 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6064 |
|
| 6065 |
uint8_tcxx . . $ uint8_t# pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6066 |
uint8_tcxx . . $ uint8_t# type = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6067 |
float amount = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6068 |
|
| 6069 |
ApplyDamageToPlayercxx . . $ ApplyDamageToPlayer(1fbfa7277d8ac7b4).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.], &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.], type, amount); |
| 6070 |
} |
| 6071 |
|
| 6072 |
// Server is telling us to create a countermeasure |
| 6073 |
void MultiDoRequestCountermeasurecxx . . $ MultiDoRequestCountermeasure(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6074 |
int count = 0; |
| 6075 |
|
| 6076 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got request for countermeasure!\n"); |
| 6077 |
|
| 6078 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6079 |
|
| 6080 |
uint16_tcxx . . $ uint16_t# parent_objnum = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 6081 |
|
| 6082 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 6083 |
parent_objnum = Server_object_listcxx . . $ Server_object_list.[parent_objnum]; |
| 6084 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(parent_objnum != 65535); |
| 6085 |
} |
| 6086 |
|
| 6087 |
uint32_tcxx . . $ uint32_t# checksum = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 6088 |
|
| 6089 |
int id = MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(checksum); |
| 6090 |
|
| 6091 |
if (id == -1) { |
| 6092 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server data doesn't match!\n"); |
| 6093 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 6094 |
MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(checksum); |
| 6095 |
|
| 6096 |
return; |
| 6097 |
} |
| 6098 |
|
| 6099 |
int objnum = FireWeaponFromObjectcxx . . $ FireWeaponFromObject(3c611958fe04e279).(&Objectscxx . . $ Objects.[parent_objnum], id, 5); |
| 6100 |
|
| 6101 |
if (objnum >= 0) { |
| 6102 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 6103 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, false); |
| 6104 |
} |
| 6105 |
} |
| 6106 |
|
| 6107 |
// We're asking the server to create a countermeasure for us |
| 6108 |
void MultiSendRequestCountermeasurecxx . . $ MultiSendRequestCountermeasure(59a23d33d43e6eac).(int16_t objnum, int weapon_index) { |
| 6109 |
int count = 0; |
| 6110 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6111 |
int size_offset; |
| 6112 |
|
| 6113 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_COUNTERMEASUREcxx . . $ `Descent3/multi.h:574:9`!, data, &count); |
| 6114 |
|
| 6115 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(objnum, data, &count); |
| 6116 |
|
| 6117 |
uint32_tcxx . . $ uint32_t# index = MultiGetMatchChecksumcxx . . $ MultiGetMatchChecksum(58c590d1186ea715).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_index); |
| 6118 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(index, data, &count); |
| 6119 |
|
| 6120 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 6121 |
|
| 6122 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) |
| 6123 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 6124 |
else |
| 6125 |
MultiDoRequestCountermeasurecxx . . $ MultiDoRequestCountermeasure(f25546b61a629de7).(data); |
| 6126 |
|
| 6127 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending out request for countermeasure!\n"); |
| 6128 |
} |
| 6129 |
|
| 6130 |
// Server is telling us about a player who is changing his observer mode |
| 6131 |
void MultiDoObserverChangecxx . . $ MultiDoObserverChange(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6132 |
int count = 0; |
| 6133 |
int objnum = -1; |
| 6134 |
|
| 6135 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6136 |
|
| 6137 |
int slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6138 |
uint8_tcxx . . $ uint8_t# mode = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6139 |
uint8_tcxx . . $ uint8_t# on = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6140 |
int restart_slot = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 6141 |
if (mode == OBSERVER_MODE_PIGGYBACKcxx . . $ `Descent3/player_external.h:76:9`!) { |
| 6142 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 6143 |
objnum = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 6144 |
else { |
| 6145 |
objnum = Server_object_listcxx . . $ Server_object_list.[MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count)]; |
| 6146 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(objnum != 65535); |
| 6147 |
} |
| 6148 |
} |
| 6149 |
|
| 6150 |
if (on) |
| 6151 |
PlayerSwitchToObservercxx . . $ PlayerSwitchToObserver(b1146eedae1e1d0b).(slot, mode, objnum); |
| 6152 |
else { |
| 6153 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].activecxx . . $ player_pos_suppress#active. = true; |
| 6154 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].expire_timecxx . . $ player_pos_suppress#expire_time. = Gametimecxx . . $ Gametime. + PLAYER_POS_HACK_TIMEcxx . . $ `Descent3/player.h:410:9`!; |
| 6155 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].roomcxx . . $ player_pos_suppress#room. = Playerscxx . . $ Players.[restart_slot].start_roomnumcxx . . $ player#start_roomnum.; |
| 6156 |
Player_pos_fixcxx . . $ Player_pos_fix.[slot].ignored_poscxx . . $ player_pos_suppress#ignored_pos. = 0; |
| 6157 |
PlayerStopObservingcxx . . $ PlayerStopObserving(d4f767463ce0a6b3).(slot); |
| 6158 |
PlayerMoveToStartPoscxx . . $ PlayerMoveToStartPos(3e454b8ccf442868).(slot, restart_slot); |
| 6159 |
} |
| 6160 |
} |
| 6161 |
|
| 6162 |
// Someone is asking us for permission to enter observer mode |
| 6163 |
void MultiDoRequestToObservecxx . . $ MultiDoRequestToObserve(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6164 |
int count = 0; |
| 6165 |
int objnum; |
| 6166 |
|
| 6167 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got request to observe!\n"); |
| 6168 |
|
| 6169 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6170 |
|
| 6171 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6172 |
|
| 6173 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6174 |
uint8_tcxx . . $ uint8_t# mode = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6175 |
uint8_tcxx . . $ uint8_t# on = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6176 |
|
| 6177 |
if (mode == OBSERVER_MODE_PIGGYBACKcxx . . $ `Descent3/player_external.h:76:9`!) |
| 6178 |
objnum = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 6179 |
|
| 6180 |
if ((Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! && on) || |
| 6181 |
(Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].typecxx . . $ object#type. == OBJ_OBSERVERcxx . . $ `Descent3/object_external.h:182:9`! && !on)) { |
| 6182 |
int newcount = 0; |
| 6183 |
uint8_tcxx . . $ uint8_t# newdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6184 |
int size_offset; |
| 6185 |
|
| 6186 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_OBSERVER_CHANGEcxx . . $ `Descent3/multi.h:588:9`!, newdata, &newcount); |
| 6187 |
|
| 6188 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, newdata, &newcount); |
| 6189 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(mode, newdata, &newcount); |
| 6190 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(on, newdata, &newcount); |
| 6191 |
|
| 6192 |
if (!on) { |
| 6193 |
int start_slot = PlayerGetRandomStartPositioncxx . . $ PlayerGetRandomStartPosition(7864480464b09eea).(slot); |
| 6194 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(start_slot, newdata, &newcount); |
| 6195 |
} else |
| 6196 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(0, newdata, &newcount); |
| 6197 |
|
| 6198 |
if (mode == OBSERVER_MODE_PIGGYBACKcxx . . $ `Descent3/player_external.h:76:9`!) { |
| 6199 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(objnum, newdata, &newcount); |
| 6200 |
} |
| 6201 |
|
| 6202 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(newcount, newdata, size_offset); |
| 6203 |
|
| 6204 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., newdata, newcount, NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, false); |
| 6205 |
MultiDoObserverChangecxx . . $ MultiDoObserverChange(f25546b61a629de7).(newdata); |
| 6206 |
} |
| 6207 |
} |
| 6208 |
|
| 6209 |
// We're asking to enter observer mode |
| 6210 |
void MultiSendRequestToObservecxx . . $ MultiSendRequestToObserve(b1146eedae1e1d0b).(int mode, int on, int objnum) { |
| 6211 |
int count = 0; |
| 6212 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6213 |
int size_offset; |
| 6214 |
|
| 6215 |
// Check to see if the player has enough shields to enter |
| 6216 |
if (on && Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.].shieldscxx . . $ object#shields. < (INITIAL_SHIELDScxx . . $ `Descent3/player_external.h:69:9`! / 2)) { |
| 6217 |
AddHUDMessagecxx . . $ AddHUDMessage(f90d95ab21fd6d97).(TXT_NOTENOUGHSHIELDSFOROBScxx . . $ `Descent3/stringtable.h:612:9`!); |
| 6218 |
return; |
| 6219 |
} |
| 6220 |
|
| 6221 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_TO_OBSERVEcxx . . $ `Descent3/multi.h:587:9`!, data, &count); |
| 6222 |
|
| 6223 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 6224 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(mode, data, &count); |
| 6225 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(on, data, &count); |
| 6226 |
|
| 6227 |
if (mode == OBSERVER_MODE_PIGGYBACKcxx . . $ `Descent3/player_external.h:76:9`!) { |
| 6228 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 6229 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(objnum, data, &count); |
| 6230 |
else |
| 6231 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(Local_object_listcxx . . $ Local_object_list.[objnum], data, &count); |
| 6232 |
} |
| 6233 |
|
| 6234 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 6235 |
|
| 6236 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 6237 |
MultiDoRequestToObservecxx . . $ MultiDoRequestToObserve(f25546b61a629de7).(data); |
| 6238 |
return; |
| 6239 |
} else |
| 6240 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 6241 |
} |
| 6242 |
|
| 6243 |
// Server is telling us about players that we can see |
| 6244 |
void MultiDoVisiblePlayerscxx . . $ MultiDoVisiblePlayers(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6245 |
int count = 0; |
| 6246 |
int i; |
| 6247 |
|
| 6248 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 6249 |
return; |
| 6250 |
|
| 6251 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6252 |
|
| 6253 |
int bitmask = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 6254 |
|
| 6255 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`! <= 32); |
| 6256 |
|
| 6257 |
for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 6258 |
int hide_it = 0; |
| 6259 |
|
| 6260 |
if (i == Player_numcxx . . $ Player_num.) |
| 6261 |
continue; |
| 6262 |
|
| 6263 |
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`!) |
| 6264 |
hide_it = 1; |
| 6265 |
|
| 6266 |
if (!(bitmask & (1 << i)) || hide_it) { |
| 6267 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || hide_it) { |
| 6268 |
// Kill all the sounds, render types, etc. |
| 6269 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].render_typecxx . . $ object#render_type. = RT_NONEcxx . . $ `Descent3/object_external.h:257:9`!; |
| 6270 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].movement_typecxx . . $ object#movement_type. = MT_NONEcxx . . $ `Descent3/object_external.h:233:9`!; |
| 6271 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. |= PF_NO_COLLIDEcxx . . $ `Descent3/object_external.h:331:9`!; |
| 6272 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].weapon_fire_flagscxx . . $ object#weapon_fire_flags. &= ~(WFF_ON_OFFcxx . . $ `Descent3/player_external.h:104:9`! | WFF_SPRAYcxx . . $ `Descent3/player_external.h:103:9`!); |
| 6273 |
Playerscxx . . $ Players.[i].flagscxx . . $ player#flags. &= ~(PLAYER_FLAGS_AFTERBURN_ONcxx . . $ `Descent3/player_external.h:92:9`! | PLAYER_FLAGS_THRUSTEDcxx . . $ `Descent3/player_external.h:94:9`!); |
| 6274 |
PlayerStopSoundscxx . . $ PlayerStopSounds(d4f767463ce0a6b3).(i); |
| 6275 |
} |
| 6276 |
} else { |
| 6277 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 6278 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].render_typecxx . . $ object#render_type. = RT_POLYOBJcxx . . $ `Descent3/object_external.h:258:9`!; |
| 6279 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].movement_typecxx . . $ object#movement_type. = MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!; |
| 6280 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.].mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. &= ~PF_NO_COLLIDEcxx . . $ `Descent3/object_external.h:331:9`!; |
| 6281 |
} |
| 6282 |
} |
| 6283 |
} |
| 6284 |
} |
| 6285 |
|
| 6286 |
// Sends all the visible players to another player |
| 6287 |
void MultiSendVisiblePlayerscxx . . $ MultiSendVisiblePlayers(d4f767463ce0a6b3).(int to_slot) { |
| 6288 |
int count = 0; |
| 6289 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6290 |
int size_offset; |
| 6291 |
|
| 6292 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_VISIBLE_PLAYERScxx . . $ `Descent3/multi.h:589:9`!, data, &count); |
| 6293 |
|
| 6294 |
// Always mark server as visible |
| 6295 |
Multi_visible_playerscxx . . $ Multi_visible_players.[to_slot] |= (1 << Player_numcxx . . $ Player_num.); |
| 6296 |
|
| 6297 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(Multi_visible_playerscxx . . $ Multi_visible_players.[to_slot], data, &count); |
| 6298 |
|
| 6299 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 6300 |
|
| 6301 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&NetPlayerscxx . . $ NetPlayers.[to_slot].addrcxx . . $ netplayer#addr., data, count, 0); |
| 6302 |
} |
| 6303 |
|
| 6304 |
void MultiDoRequestPeerDamagecxx . . $ MultiDoRequestPeerDamage(b4ed6bda213be74).(uint8_tcxx . . $ uint8_t# *data, network_addresscxx . . $ network_address# *from_addr) { |
| 6305 |
int count = 0; |
| 6306 |
|
| 6307 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 6308 |
return; |
| 6309 |
|
| 6310 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6311 |
|
| 6312 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6313 |
uint16_tcxx . . $ uint16_t# killer_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 6314 |
uint8_tcxx . . $ uint8_t# weapon_id = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 6315 |
uint8_tcxx . . $ uint8_t# damage_type = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 6316 |
float amount = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6317 |
|
| 6318 |
if (killer_objnum == 65535 || Objectscxx . . $ Objects.[killer_objnum].typecxx . . $ object#type. == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) |
| 6319 |
ApplyDamageToPlayercxx . . $ ApplyDamageToPlayer(1fbfa7277d8ac7b4).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.], &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.], damage_type, amount, 1, |
| 6320 |
weapon_id); |
| 6321 |
else |
| 6322 |
ApplyDamageToPlayercxx . . $ ApplyDamageToPlayer(1fbfa7277d8ac7b4).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.], &Objectscxx . . $ Objects.[killer_objnum], damage_type, amount, 1, weapon_id); |
| 6323 |
} |
| 6324 |
|
| 6325 |
// Tell the server to damage us |
| 6326 |
void MultiSendRequestPeerDamagecxx . . $ MultiSendRequestPeerDamage(429600379706fe12).(objectcxx . . $ object# *killer, int weapon_id, int damage_type, float amount) { |
| 6327 |
int size; |
| 6328 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6329 |
int count = 0; |
| 6330 |
|
| 6331 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 6332 |
return; |
| 6333 |
|
| 6334 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending request peer damage of %f\n", amount); |
| 6335 |
|
| 6336 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_PEER_DAMAGEcxx . . $ `Descent3/multi.h:618:9`!, data, &count); |
| 6337 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 6338 |
|
| 6339 |
// Add killer info |
| 6340 |
if (killer == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`! || Local_object_listcxx . . $ Local_object_list.[killer - Objectscxx . . $ Objects.] == 65535 || killer == &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.]) |
| 6341 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(65535, data, &count); |
| 6342 |
else |
| 6343 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(Local_object_listcxx . . $ Local_object_list.[killer - Objectscxx . . $ Objects.], data, &count); |
| 6344 |
|
| 6345 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(weapon_id, data, &count); |
| 6346 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(damage_type, data, &count); |
| 6347 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(amount, data, &count); |
| 6348 |
|
| 6349 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 6350 |
|
| 6351 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 6352 |
} |
| 6353 |
|
| 6354 |
// Starts a new multiplayer game |
| 6355 |
void StartNewMultiplayerGamecxx . . $ StartNewMultiplayerGame(49f6e7a06ebc5aa8).() { SetGameStatecxx . . $ SetGameState(35729c5b0b4aef73).(GAMESTATE_LVLSTARTcxx . . $ GAMESTATE_LVLSTART.); } |
| 6356 |
|
| 6357 |
// Deletes all the objects in the level except for players |
| 6358 |
// Makes all the players ghosts |
| 6359 |
void MultiMassageAllObjectscxx . . $ MultiMassageAllObjects(3e454b8ccf442868).(int kill_powerups, int kill_robots) { |
| 6360 |
int i; |
| 6361 |
Num_powerup_respawncxx . . $ Num_powerup_respawn. = 0; |
| 6362 |
Num_powerup_timercxx . . $ Num_powerup_timer. = 0; |
| 6363 |
Num_client_lm_objectscxx . . $ Num_client_lm_objects. = 0; |
| 6364 |
Num_server_lm_objectscxx . . $ Num_server_lm_objects. = 0; |
| 6365 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Massaging all objects!\n"); |
| 6366 |
|
| 6367 |
for (i = 0; i <= Highest_object_indexcxx . . $ Highest_object_index.; i++) { |
| 6368 |
// If client, delete all robots and powerups |
| 6369 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 6370 |
if (IS_GENERICcxx . . $ `Descent3/object_external.h:190:9`!(Objects[i].type) || Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == OBJ_DOORcxx . . $ `Descent3/object_external.h:177:9`!) { |
| 6371 |
if (IS_GENERICcxx . . $ `Descent3/object_external.h:190:9`!(Objects[i].type)) { |
| 6372 |
if (Object_infocxx . . $ Object_info.[Objectscxx . . $ Objects.[i].idcxx . . $ object#id.].lighting_infocxx . . $ object_info#lighting_info..lighting_render_typecxx . . $ light_info#lighting_render_type. != LRT_LIGHTMAPScxx . . $ `Descent3/object.h:651:9`!) { |
| 6373 |
Objectscxx . . $ Objects.[i].flagscxx . . $ object#flags. |= OF_SERVER_SAYS_DELETEcxx . . $ `Descent3/object_external.h:290:9`!; |
| 6374 |
ObjDeletecxx . . $ ObjDelete(d4f767463ce0a6b3).(i); |
| 6375 |
} else { |
| 6376 |
// Add it to our lightmap list |
| 6377 |
Client_lightmap_listcxx . . $ Client_lightmap_list.[Num_client_lm_objectscxx . . $ Num_client_lm_objects.] = i; |
| 6378 |
Num_client_lm_objectscxx . . $ Num_client_lm_objects.++; |
| 6379 |
} |
| 6380 |
} else { |
| 6381 |
// Add this door to our lightmap list |
| 6382 |
Client_lightmap_listcxx . . $ Client_lightmap_list.[Num_client_lm_objectscxx . . $ Num_client_lm_objects.] = i; |
| 6383 |
Num_client_lm_objectscxx . . $ Num_client_lm_objects.++; |
| 6384 |
} |
| 6385 |
} |
| 6386 |
} |
| 6387 |
|
| 6388 |
// If Server, then only delete the types we're supposed to |
| 6389 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 6390 |
if ((Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`! || (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`! && Objectscxx . . $ Objects.[i].ai_infocxx . . $ object#ai_info.)) && kill_robots) { |
| 6391 |
ObjDeletecxx . . $ ObjDelete(d4f767463ce0a6b3).(i); |
| 6392 |
} else if (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!) { |
| 6393 |
if ((kill_powerups) || (!(Object_infocxx . . $ Object_info.[Objectscxx . . $ Objects.[i].idcxx . . $ object#id.].multi_allowedcxx . . $ object_info#multi_allowed.))) |
| 6394 |
ObjDeletecxx . . $ ObjDelete(d4f767463ce0a6b3).(i); |
| 6395 |
else { |
| 6396 |
if (Num_powerup_respawncxx . . $ Num_powerup_respawn. < MAX_RESPAWNScxx . . $ `Descent3/multi.h:714:9`!) { |
| 6397 |
Powerup_respawncxx . . $ Powerup_respawn.[Num_powerup_respawncxx . . $ Num_powerup_respawn.].poscxx . . $ powerup_respawn#pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Objectscxx . . $ Objects.[i].poscxx . . $ object#pos.; |
| 6398 |
Powerup_respawncxx . . $ Powerup_respawn.[Num_powerup_respawncxx . . $ Num_powerup_respawn.].roomnumcxx . . $ powerup_respawn#roomnum. = Objectscxx . . $ Objects.[i].roomnumcxx . . $ object#roomnum.; |
| 6399 |
Powerup_respawncxx . . $ Powerup_respawn.[Num_powerup_respawncxx . . $ Num_powerup_respawn.].objnumcxx . . $ powerup_respawn#objnum. = i; |
| 6400 |
Powerup_respawncxx . . $ Powerup_respawn.[Num_powerup_respawncxx . . $ Num_powerup_respawn.].usedcxx . . $ powerup_respawn#used. = 1; |
| 6401 |
Powerup_respawncxx . . $ Powerup_respawn.[Num_powerup_respawncxx . . $ Num_powerup_respawn.].original_idcxx . . $ powerup_respawn#original_id. = Objectscxx . . $ Objects.[i].idcxx . . $ object#id.; |
| 6402 |
Num_powerup_respawncxx . . $ Num_powerup_respawn.++; |
| 6403 |
} |
| 6404 |
} |
| 6405 |
} |
| 6406 |
Objectscxx . . $ Objects.[i].flagscxx . . $ object#flags. |= OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!; |
| 6407 |
} |
| 6408 |
|
| 6409 |
if (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 6410 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`! || (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && Objectscxx . . $ Objects.[i].idcxx . . $ object#id. != Player_numcxx . . $ Player_num.)) { |
| 6411 |
MultiMakePlayerGhostcxx . . $ MultiMakePlayerGhost(d4f767463ce0a6b3).(Objectscxx . . $ Objects.[i].idcxx . . $ object#id.); |
| 6412 |
} |
| 6413 |
} |
| 6414 |
} |
| 6415 |
} |
| 6416 |
|
| 6417 |
int MultiGetShipChecksumcxx . . $ MultiGetShipChecksum(7864480464b09eea).(int ship_index); |
| 6418 |
// Starts multiplayer-specific stuff for a new level |
| 6419 |
// Anything not specific to multiplayer should be in StartNewLevel() |
| 6420 |
bool MultiStartNewLevelcxx . . $ MultiStartNewLevel(83c267b20bac841a).(int level) { |
| 6421 |
Time_last_taunt_requestcxx . . $ Time_last_taunt_request. = 0; |
| 6422 |
|
| 6423 |
// Figure the ships into the checksum |
| 6424 |
for (int i = 0; i < MAX_SHIPScxx . . $ `Descent3/ship.h:122:9`!; i++) |
| 6425 |
if (Shipscxx . . $ Ships.[i].usedcxx . . $ ship#used.) |
| 6426 |
MultiGetShipChecksumcxx . . $ MultiGetShipChecksum(7864480464b09eea).(i); |
| 6427 |
|
| 6428 |
Reliable_countcxx . . $ Reliable_count. = 0; |
| 6429 |
Last_reliable_countcxx . . $ Last_reliable_count. = -1; |
| 6430 |
Multi_next_levelcxx . . $ Multi_next_level. = -1; |
| 6431 |
|
| 6432 |
#ifndef RELEASE |
| 6433 |
// Clear our packet tracking |
| 6434 |
for (int i = 0; i < 255; i++) |
| 6435 |
Multi_packet_trackingcxx . . $ Multi_packet_tracking.[i] = 0; |
| 6436 |
|
| 6437 |
#endif |
| 6438 |
|
| 6439 |
memset(Player_pos_fixcxx . . $ Player_pos_fix., 0, sizeof(Player_pos_fixcxx . . $ Player_pos_fix.)); |
| 6440 |
|
| 6441 |
memset(Multi_building_statescxx . . $ Multi_building_states., 0, MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!); |
| 6442 |
Multi_num_buildings_changedcxx . . $ Multi_num_buildings_changed. = 0; |
| 6443 |
|
| 6444 |
memset(Multi_additional_damagecxx . . $ Multi_additional_damage., 0, MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`! * 4); |
| 6445 |
memset(Multi_additional_shieldscxx . . $ Multi_additional_shields., 0, MAX_SHIELD_REQUEST_TYPEScxx . . $ `Descent3/multi.h:651:9`! * 4); |
| 6446 |
Multi_requested_damage_amountcxx . . $ Multi_requested_damage_amount. = 0; |
| 6447 |
|
| 6448 |
for (int i = 0; i < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!; i++) { |
| 6449 |
Server_object_listcxx . . $ Server_object_list.[i] = 65535; |
| 6450 |
Local_object_listcxx . . $ Local_object_list.[i] = 65535; |
| 6451 |
Objectscxx . . $ Objects.[i].generic_nonvis_flagscxx . . $ object#generic_nonvis_flags. = 0; |
| 6452 |
} |
| 6453 |
|
| 6454 |
for (int i = 0; i < MAX_SPEW_EFFECTScxx . . $ `Descent3/spew.h:131:9`!; i++) |
| 6455 |
Server_spew_listcxx . . $ Server_spew_list.[i] = 65535; |
| 6456 |
|
| 6457 |
// SCRIPT POINT!!! |
| 6458 |
MultiMassageAllObjectscxx . . $ MultiMassageAllObjects(3e454b8ccf442868).(0, (Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_USE_ROBOTScxx . . $ `Descent3/multi_external.h:228:9`!) ? 0 : 1); |
| 6459 |
MultiBuildMatchTablescxx . . $ MultiBuildMatchTables(49f6e7a06ebc5aa8).(); |
| 6460 |
Num_broke_glasscxx . . $ Num_broke_glass. = 0; |
| 6461 |
|
| 6462 |
// Fill in player object numbers |
| 6463 |
for (int i = 0; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 6464 |
if (Playerscxx . . $ Players.[i].start_roomnumcxx . . $ player#start_roomnum. != -1) { |
| 6465 |
int objnum = Playerscxx . . $ Players.[i].objnumcxx . . $ player#objnum.; |
| 6466 |
|
| 6467 |
Server_object_listcxx . . $ Server_object_list.[objnum] = objnum; |
| 6468 |
Local_object_listcxx . . $ Local_object_list.[objnum] = objnum; |
| 6469 |
Objectscxx . . $ Objects.[objnum].flagscxx . . $ object#flags. |= (OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`! | OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 6470 |
} |
| 6471 |
|
| 6472 |
InitPlayerNewLevelcxx . . $ InitPlayerNewLevel(d4f767463ce0a6b3).(i); |
| 6473 |
|
| 6474 |
// Inititialize all other players besides myself |
| 6475 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`! && i != Player_numcxx . . $ Player_num. && !(NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_SERVERcxx . . $ `Descent3/multi_external.h:166:9`!)) |
| 6476 |
NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. &= ~NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!; |
| 6477 |
} |
| 6478 |
|
| 6479 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) |
| 6480 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. = NETSEQ_LEVEL_STARTcxx . . $ `Descent3/multi_external.h:150:9`!; |
| 6481 |
else { |
| 6482 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. = NETSEQ_PREGAMEcxx . . $ `Descent3/multi_external.h:148:9`!; |
| 6483 |
} |
| 6484 |
|
| 6485 |
ResetTeamScorescxx . . $ ResetTeamScores(49f6e7a06ebc5aa8).(); |
| 6486 |
|
| 6487 |
InitPlayerNewShipcxx . . $ InitPlayerNewShip(3e454b8ccf442868).(Player_numcxx . . $ Player_num., INVRESET_ALLcxx . . $ `Descent3/Inventory.h:201:9`!); |
| 6488 |
|
| 6489 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`! && Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_ALLOWGUIDEBOTcxx . . $ `Descent3/multi_external.h:232:9`!) { |
| 6490 |
// add the guidebot for the server here |
| 6491 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Buddy_handle[Player_num] != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 6492 |
if ((!Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].inventorycxx . . $ player#inventory..CheckItemcxx . . $ Inventory#CheckItem(cf9ef193275fa6d8).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!)) && |
| 6493 |
(ObjGetcxx . . $ ObjGet(11672e354c0b263a).(Buddy_handlecxx . . $ Buddy_handle.[Player_numcxx . . $ Player_num.])->typecxx . . $ object#type. != OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!)) |
| 6494 |
Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].inventorycxx . . $ player#inventory..Addcxx . . $ Inventory#Add(122d808d8b1091da).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!); |
| 6495 |
} |
| 6496 |
|
| 6497 |
CallGameDLLcxx . . $ CallGameDLL(32ca0c0c7dbc2fcf).(EVT_GAMELEVELSTARTcxx . . $ `lib/d3events.h:74:9`!, &DLLInfocxx . . $ DLLInfo.); |
| 6498 |
|
| 6499 |
return true; |
| 6500 |
} |
| 6501 |
|
| 6502 |
// Returns the number of players in a game |
| 6503 |
int MultiCountPlayerscxx . . $ MultiCountPlayers(b126dc7c1de90089).() { |
| 6504 |
int i; |
| 6505 |
int count = 0; |
| 6506 |
|
| 6507 |
for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 6508 |
if (NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) |
| 6509 |
count++; |
| 6510 |
} |
| 6511 |
|
| 6512 |
return count; |
| 6513 |
} |
| 6514 |
|
| 6515 |
// Sends a full packet out the the server |
| 6516 |
// Resets the send_size variable |
| 6517 |
// Server only |
| 6518 |
void MultiSendFullPacketcxx . . $ MultiSendFullPacket(3e454b8ccf442868).(int slot, int flags) { |
| 6519 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6520 |
|
| 6521 |
if (Multi_send_sizecxx . . $ Multi_send_size.[slot] < 1) |
| 6522 |
return; |
| 6523 |
|
| 6524 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(NetPlayers[slot].flags & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!); |
| 6525 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&NetPlayerscxx . . $ NetPlayers.[slot].addrcxx . . $ netplayer#addr., Multi_send_buffercxx . . $ Multi_send_buffer.[slot], Multi_send_sizecxx . . $ Multi_send_size.[slot], flags); |
| 6526 |
Multi_send_sizecxx . . $ Multi_send_size.[slot] = 0; |
| 6527 |
} |
| 6528 |
|
| 6529 |
// Sends a full packet out the the server |
| 6530 |
// Resets the send_size variable |
| 6531 |
// Client and Server |
| 6532 |
void MultiSendFullReliablePacketcxx . . $ MultiSendFullReliablePacket(3e454b8ccf442868).(int slot, int flags) { |
| 6533 |
if (slot == SERVER_PLAYERcxx . . $ `Descent3/multi.h:654:9`!) |
| 6534 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6535 |
|
| 6536 |
// We're sending to the server |
| 6537 |
if (slot == SERVER_PLAYERcxx . . $ `Descent3/multi.h:654:9`!) { |
| 6538 |
// mprintf(0,"Sending full packet of size %d to slot%d!\n",Multi_cur_send_size,slot); |
| 6539 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., Multi_reliable_send_buffercxx . . $ Multi_reliable_send_buffer.[Player_numcxx . . $ Player_num.], |
| 6540 |
Multi_reliable_send_sizecxx . . $ Multi_reliable_send_size.[Player_numcxx . . $ Player_num.], false); |
| 6541 |
Multi_reliable_send_sizecxx . . $ Multi_reliable_send_size.[Player_numcxx . . $ Player_num.] = 0; |
| 6542 |
Multi_reliable_sent_positioncxx . . $ Multi_reliable_sent_position.[Player_numcxx . . $ Player_num.] = 0; |
| 6543 |
Multi_reliable_last_send_timecxx . . $ Multi_reliable_last_send_time.[Player_numcxx . . $ Player_num.] = 0; |
| 6544 |
Multi_reliable_urgentcxx . . $ Multi_reliable_urgent.[Player_numcxx . . $ Player_num.] = 0; |
| 6545 |
} else // We are the server and we're sending to "slot" |
| 6546 |
{ |
| 6547 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(NetPlayers[slot].flags & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!); |
| 6548 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[slot].reliable_socketcxx . . $ netplayer#reliable_socket., Multi_reliable_send_buffercxx . . $ Multi_reliable_send_buffer.[slot], Multi_reliable_send_sizecxx . . $ Multi_reliable_send_size.[slot], |
| 6549 |
true); |
| 6550 |
Multi_reliable_send_sizecxx . . $ Multi_reliable_send_size.[slot] = 0; |
| 6551 |
Multi_reliable_sent_positioncxx . . $ Multi_reliable_sent_position.[slot] = 0; |
| 6552 |
Multi_reliable_last_send_timecxx . . $ Multi_reliable_last_send_time.[slot] = 0; |
| 6553 |
Multi_reliable_urgentcxx . . $ Multi_reliable_urgent.[slot] = 0; |
| 6554 |
} |
| 6555 |
} |
| 6556 |
|
| 6557 |
// Given a string, returns a unique integer for that string |
| 6558 |
uint32_tcxx . . $ uint32_t# MultiGetUniqueIDFromStringcxx . . $ MultiGetUniqueIDFromString(33ab057182e9f89d).(char *plainstring) { |
| 6559 |
int i, t, len; |
| 6560 |
uint32_tcxx . . $ uint32_t# ret; |
| 6561 |
uint8_tcxx . . $ uint8_t# cryptstring[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; |
| 6562 |
uint32_tcxx . . $ uint32_t# vals[4]; |
| 6563 |
|
| 6564 |
len = strlen(plainstring); |
| 6565 |
|
| 6566 |
if (len < 4) { |
| 6567 |
for (i = len; i < 4; i++) |
| 6568 |
plainstring[i] = ('g' + i); |
| 6569 |
|
| 6570 |
len = 4; |
| 6571 |
} |
| 6572 |
|
| 6573 |
for (i = 0; i < 4; i++) { |
| 6574 |
cryptstring[i] = 0; |
| 6575 |
uint8_tcxx . . $ uint8_t# backbyte; |
| 6576 |
|
| 6577 |
if (i == 0) |
| 6578 |
backbyte = 0x9a; |
| 6579 |
else |
| 6580 |
backbyte = plainstring[i - 1]; |
| 6581 |
|
| 6582 |
for (t = 0; t < len; t++) { |
| 6583 |
uint8_tcxx . . $ uint8_t# a = plainstring[t]; |
| 6584 |
uint8_tcxx . . $ uint8_t# b = plainstring[i % (t + 1)]; |
| 6585 |
|
| 6586 |
a *= a; |
| 6587 |
b *= b * b; |
| 6588 |
|
| 6589 |
cryptstring[i] += a ^ b ^ (backbyte + t); |
| 6590 |
} |
| 6591 |
|
| 6592 |
vals[i] = cryptstring[i]; |
| 6593 |
} |
| 6594 |
|
| 6595 |
ret = (vals[0] << 24) | (vals[1] << 16) | (vals[2] << 8) | (vals[3]); |
| 6596 |
|
| 6597 |
if (ret == 0) { |
| 6598 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason, no match at all |
| 6599 |
return 0; |
| 6600 |
} |
| 6601 |
|
| 6602 |
return ret; |
| 6603 |
} |
| 6604 |
|
| 6605 |
// Returns the unique id of a given object type/id |
| 6606 |
uint32_tcxx . . $ uint32_t# MultiGetMatchChecksumcxx . . $ MultiGetMatchChecksum(58c590d1186ea715).(int type, int id) { |
| 6607 |
switch (type) { |
| 6608 |
case OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!: |
| 6609 |
case OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!: |
| 6610 |
case OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`!: |
| 6611 |
case OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`!: |
| 6612 |
return Multi_generic_match_tablecxx . . $ Multi_generic_match_table.[id]; |
| 6613 |
break; |
| 6614 |
case OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!: |
| 6615 |
return Multi_weapon_match_tablecxx . . $ Multi_weapon_match_table.[id]; |
| 6616 |
break; |
| 6617 |
case OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!: |
| 6618 |
return id; |
| 6619 |
break; |
| 6620 |
default: |
| 6621 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason |
| 6622 |
} |
| 6623 |
|
| 6624 |
Errorcxx . . $ Error(326aeb464d16410c).("Invalid type/id combo in MultiGetMatchChecksum"); |
| 6625 |
return -1; |
| 6626 |
} |
| 6627 |
|
| 6628 |
// Return index of generic that has matching table entry |
| 6629 |
int MultiMatchGenericcxx . . $ MultiMatchGeneric(4c679297bf94b9eb).(uint32_tcxx . . $ uint32_t# unique_id) { |
| 6630 |
for (int i = 0; i < MAX_OBJECT_IDScxx . . $ `Descent3/objinfo.h:327:9`!; i++) |
| 6631 |
if (Multi_generic_match_tablecxx . . $ Multi_generic_match_table.[i] == unique_id) |
| 6632 |
return i; |
| 6633 |
|
| 6634 |
return -1; |
| 6635 |
} |
| 6636 |
|
| 6637 |
// Return index of generic that has matching table entry |
| 6638 |
int MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(uint32_tcxx . . $ uint32_t# unique_id) { |
| 6639 |
for (int i = 0; i < MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!; i++) |
| 6640 |
if (Multi_weapon_match_tablecxx . . $ Multi_weapon_match_table.[i] == unique_id) |
| 6641 |
return i; |
| 6642 |
|
| 6643 |
return -1; |
| 6644 |
} |
| 6645 |
|
| 6646 |
// Builds the tables for uniquely identifying powerups and robots |
| 6647 |
void MultiBuildMatchTablescxx . . $ MultiBuildMatchTables(49f6e7a06ebc5aa8).() { |
| 6648 |
int i; |
| 6649 |
|
| 6650 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Building match tables for multiplayer.\n"); |
| 6651 |
|
| 6652 |
memset(Multi_generic_match_tablecxx . . $ Multi_generic_match_table., 0, MAX_OBJECT_IDScxx . . $ `Descent3/objinfo.h:327:9`! * sizeof(int)); |
| 6653 |
memset(Multi_weapon_match_tablecxx . . $ Multi_weapon_match_table., 0, MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`! * sizeof(int)); |
| 6654 |
|
| 6655 |
// Build generic tables |
| 6656 |
for (i = 0; i < MAX_OBJECT_IDScxx . . $ `Descent3/objinfo.h:327:9`!; i++) { |
| 6657 |
if (Object_infocxx . . $ Object_info.[i].typecxx . . $ object_info#type. != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 6658 |
uint32_tcxx . . $ uint32_t# val = MultiGetUniqueIDFromStringcxx . . $ MultiGetUniqueIDFromString(33ab057182e9f89d).(Object_infocxx . . $ Object_info.[i].namecxx . . $ object_info#name.); |
| 6659 |
val += Object_infocxx . . $ Object_info.[i].typecxx . . $ object_info#type.; |
| 6660 |
|
| 6661 |
// See if there is a hash collision. If so, increment the value and retry |
| 6662 |
while ((MultiMatchGenericcxx . . $ MultiMatchGeneric(4c679297bf94b9eb).(val)) != -1) { |
| 6663 |
|
| 6664 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Match collision!\n"); |
| 6665 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 6666 |
val++; |
| 6667 |
} |
| 6668 |
|
| 6669 |
Multi_generic_match_tablecxx . . $ Multi_generic_match_table.[i] = val; |
| 6670 |
} else |
| 6671 |
Multi_generic_match_tablecxx . . $ Multi_generic_match_table.[i] = 0; |
| 6672 |
} |
| 6673 |
|
| 6674 |
// Build weapon tables |
| 6675 |
for (i = 0; i < MAX_WEAPONScxx . . $ `Descent3/weapon.h:208:9`!; i++) { |
| 6676 |
if (Weaponscxx . . $ Weapons.[i].usedcxx . . $ weapon#used.) { |
| 6677 |
uint32_tcxx . . $ uint32_t# val = MultiGetUniqueIDFromStringcxx . . $ MultiGetUniqueIDFromString(33ab057182e9f89d).(Weaponscxx . . $ Weapons.[i].namecxx . . $ weapon#name.); |
| 6678 |
|
| 6679 |
// See if there is a hash collision. If so, increment the value and retry |
| 6680 |
while ((MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(val)) != -1) { |
| 6681 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Match collision!\n"); |
| 6682 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 6683 |
val++; |
| 6684 |
} |
| 6685 |
|
| 6686 |
Multi_weapon_match_tablecxx . . $ Multi_weapon_match_table.[i] = val; |
| 6687 |
} else |
| 6688 |
Multi_weapon_match_tablecxx . . $ Multi_weapon_match_table.[i] = 0; |
| 6689 |
} |
| 6690 |
} |
| 6691 |
|
| 6692 |
// Paints all the goal rooms in a level with their colors |
| 6693 |
void MultiPaintGoalRoomscxx . . $ MultiPaintGoalRooms(11b0e290e57a7e53).(int *texcolors) { |
| 6694 |
int i; |
| 6695 |
/* |
| 6696 |
$$TABLE_TEXTURE "Redbase" |
| 6697 |
$$TABLE_TEXTURE "Bluebase" |
| 6698 |
$$TABLE_TEXTURE "Greenbase" |
| 6699 |
$$TABLE_TEXTURE "Yellowbase" |
| 6700 |
*/ |
| 6701 |
|
| 6702 |
const char *tnames[] = {"RedBase", "BlueBase", "GreenBase", "YellowBase"}; |
| 6703 |
|
| 6704 |
for (i = 0; i < MAX_TEAMScxx . . $ `Descent3/player_external_struct.h:87:9`!; i++) { |
| 6705 |
int roomnum = GetGoalRoomForTeamcxx . . $ GetGoalRoomForTeam(7864480464b09eea).(i); |
| 6706 |
if (roomnum != -1) { |
| 6707 |
Roomscxx . . $ Rooms.[roomnum].room_change_flagscxx . . $ room#room_change_flags. |= RCF_TEXTUREcxx . . $ `Descent3/multi_world_state.h:57:9`!; |
| 6708 |
|
| 6709 |
int tex; |
| 6710 |
if (texcolors == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) { |
| 6711 |
tex = FindTextureNamecxx . . $ FindTextureName(5c4306d8553b3696).(IGNORE_TABLEcxx . . $ `lib/manage_external.h:54:9`!(tnames[i])); |
| 6712 |
if (tex == -1) |
| 6713 |
tex = 0; |
| 6714 |
} else { |
| 6715 |
tex = texcolors[i]; |
| 6716 |
if (tex == -1) |
| 6717 |
continue; |
| 6718 |
} |
| 6719 |
|
| 6720 |
int goalfaces = 0; |
| 6721 |
int t; |
| 6722 |
|
| 6723 |
for (t = 0; t < Roomscxx . . $ Rooms.[roomnum].num_facescxx . . $ room#num_faces. && !goalfaces; t++) { |
| 6724 |
if (Roomscxx . . $ Rooms.[roomnum].facescxx . . $ room#faces.[t].flagscxx . . $ face#flags. & FF_GOALFACEcxx . . $ `Descent3/room_external.h:125:9`!) { |
| 6725 |
goalfaces = 1; |
| 6726 |
} |
| 6727 |
} |
| 6728 |
|
| 6729 |
for (t = 0; t < Roomscxx . . $ Rooms.[roomnum].num_facescxx . . $ room#num_faces.; t++) { |
| 6730 |
texturecxx . . $ texture# *texp = &GameTexturescxx . . $ GameTextures.[Roomscxx . . $ Rooms.[roomnum].facescxx . . $ room#faces.[t].tmapcxx . . $ face#tmap.]; |
| 6731 |
if ((!(texp->flagscxx . . $ texture#flags. & TF_ALPHAcxx . . $ `Descent3/gametexture.h:223:9`!)) && texp->rcxx . . $ texture#r. < .01 && texp->gcxx . . $ texture#g. < .01 && texp->bcxx . . $ texture#b. < .01) { |
| 6732 |
if (!goalfaces || (goalfaces && Roomscxx . . $ Rooms.[roomnum].facescxx . . $ room#faces.[t].flagscxx . . $ face#flags. & FF_GOALFACEcxx . . $ `Descent3/room_external.h:125:9`!)) { |
| 6733 |
Roomscxx . . $ Rooms.[roomnum].facescxx . . $ room#faces.[t].tmapcxx . . $ face#tmap. = tex; |
| 6734 |
Roomscxx . . $ Rooms.[roomnum].facescxx . . $ room#faces.[t].flagscxx . . $ face#flags. |= FF_TEXTURE_CHANGEDcxx . . $ `Descent3/room_external.h:115:9`!; |
| 6735 |
} |
| 6736 |
} |
| 6737 |
} |
| 6738 |
} |
| 6739 |
} |
| 6740 |
} |
| 6741 |
|
| 6742 |
void MultiSendKillObjectcxx . . $ MultiSendKillObject(1833889a812a22e6).(objectcxx . . $ object# *hit_obj, objectcxx . . $ object# *killer, float damage, int death_flags, float delay, int16_t seed) { |
| 6743 |
int size; |
| 6744 |
int count = 0; |
| 6745 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6746 |
uint16_tcxx . . $ uint16_t# hit_objnum, killer_objnum; |
| 6747 |
|
| 6748 |
// mprintf(0,"MultiSendExplodeObject Hit obj:%d Killer Obj: %d\n",OBJNUM(hit_obj),OBJNUM(killer)); |
| 6749 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6750 |
|
| 6751 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(hit_obj->flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 6752 |
|
| 6753 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ROBOT_EXPLODEcxx . . $ `Descent3/multi.h:570:9`!, data, &count, 1); |
| 6754 |
// Get the dying objnum |
| 6755 |
hit_objnum = OBJNUMcxx . . $ `Descent3/object.h:700:9`!(hit_obj); |
| 6756 |
// Get the killer objnum |
| 6757 |
|
| 6758 |
if (killer != NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) |
| 6759 |
killer_objnum = OBJNUMcxx . . $ `Descent3/object.h:700:9`!(killer); |
| 6760 |
else |
| 6761 |
killer_objnum = 65535; |
| 6762 |
|
| 6763 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(hit_objnum, data, &count); |
| 6764 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(killer_objnum, data, &count); |
| 6765 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(damage, data, &count); |
| 6766 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(death_flags, data, &count); |
| 6767 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(delay, data, &count); |
| 6768 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(seed, data, &count); |
| 6769 |
|
| 6770 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 6771 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, false); |
| 6772 |
} |
| 6773 |
|
| 6774 |
void MultiDoRobotExplodecxx . . $ MultiDoRobotExplode(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6775 |
int count = 0; |
| 6776 |
float damage, delay; |
| 6777 |
uint16_tcxx . . $ uint16_t# hit_objnum, killer_objnum, seed; |
| 6778 |
int death_flags; |
| 6779 |
|
| 6780 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6781 |
|
| 6782 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6783 |
hit_objnum = Server_object_listcxx . . $ Server_object_list.[MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count)]; |
| 6784 |
|
| 6785 |
if (hit_objnum == 65535) { |
| 6786 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bad hit_objnum(%d) MultiDoRobotExplode\n", hit_objnum); |
| 6787 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(1); |
| 6788 |
return; |
| 6789 |
} |
| 6790 |
|
| 6791 |
killer_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 6792 |
|
| 6793 |
if (killer_objnum != 65535) { |
| 6794 |
killer_objnum = Server_object_listcxx . . $ Server_object_list.[killer_objnum]; |
| 6795 |
|
| 6796 |
if (killer_objnum == 65535) { |
| 6797 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bad killer_objnum(%d) in MultiDoRobotExplode()\n", killer_objnum); |
| 6798 |
} |
| 6799 |
} |
| 6800 |
|
| 6801 |
damage = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6802 |
death_flags = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 6803 |
delay = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6804 |
seed = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 6805 |
if (killer_objnum != 65535) { |
| 6806 |
if ((Objectscxx . . $ Objects.[killer_objnum].typecxx . . $ object#type. != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) && (Objectscxx . . $ Objects.[hit_objnum].typecxx . . $ object#type. != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!)) { |
| 6807 |
Objectscxx . . $ Objects.[hit_objnum].flagscxx . . $ object#flags. |= OF_SERVER_SAYS_DELETEcxx . . $ `Descent3/object_external.h:290:9`!; |
| 6808 |
ps_srandcxx . . $ ps_srand(cb2f890c2fdad230).(seed); |
| 6809 |
KillObjectcxx . . $ KillObject(8f52e4200539b78).(&Objectscxx . . $ Objects.[hit_objnum], &Objectscxx . . $ Objects.[killer_objnum], damage, death_flags, delay); |
| 6810 |
} |
| 6811 |
} else { |
| 6812 |
if ((Objectscxx . . $ Objects.[hit_objnum].typecxx . . $ object#type. != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!)) { |
| 6813 |
Objectscxx . . $ Objects.[hit_objnum].flagscxx . . $ object#flags. |= OF_SERVER_SAYS_DELETEcxx . . $ `Descent3/object_external.h:290:9`!; |
| 6814 |
ps_srandcxx . . $ ps_srand(cb2f890c2fdad230).(seed); |
| 6815 |
KillObjectcxx . . $ KillObject(8f52e4200539b78).(&Objectscxx . . $ Objects.[hit_objnum], NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!, damage, death_flags, delay); |
| 6816 |
} |
| 6817 |
} |
| 6818 |
} |
| 6819 |
|
| 6820 |
void MultiSendDamageObjectcxx . . $ MultiSendDamageObject(3a7735745f872cae).(objectcxx . . $ object# *hit_obj, objectcxx . . $ object# *killer, float damage, int weaponid) { |
| 6821 |
int size; |
| 6822 |
int count = 0; |
| 6823 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6824 |
uint16_tcxx . . $ uint16_t# hit_objnum, killer_objnum; |
| 6825 |
|
| 6826 |
// mprintf(0,"MultiSendDamageObject Hit obj:%d Killer Obj: %d\n",OBJNUM(hit_obj),OBJNUM(killer)); |
| 6827 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6828 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(hit_obj->flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 6829 |
// mprintf(0,"$");//KBTEST |
| 6830 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ROBOT_DAMAGEcxx . . $ `Descent3/multi.h:569:9`!, data, &count, 1); |
| 6831 |
// Get the dying objnum |
| 6832 |
hit_objnum = OBJNUMcxx . . $ `Descent3/object.h:700:9`!(hit_obj); |
| 6833 |
// Get the killer objnum |
| 6834 |
killer_objnum = OBJNUMcxx . . $ `Descent3/object.h:700:9`!(killer); |
| 6835 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(hit_objnum, data, &count); |
| 6836 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(killer_objnum, data, &count); |
| 6837 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(damage, data, &count); |
| 6838 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(weaponid, data, &count); |
| 6839 |
|
| 6840 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 6841 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, false); |
| 6842 |
} |
| 6843 |
|
| 6844 |
void MultiDoRobotDamagecxx . . $ MultiDoRobotDamage(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6845 |
int count = 0; |
| 6846 |
float damage; |
| 6847 |
int weaponid; |
| 6848 |
uint16_tcxx . . $ uint16_t# hit_objnum, killer_objnum; |
| 6849 |
|
| 6850 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6851 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6852 |
hit_objnum = Server_object_listcxx . . $ Server_object_list.[MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count)]; |
| 6853 |
killer_objnum = Server_object_listcxx . . $ Server_object_list.[MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count)]; |
| 6854 |
|
| 6855 |
if (hit_objnum == 65535 || killer_objnum == 65535 || !(Objectscxx . . $ Objects.[hit_objnum].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!) || |
| 6856 |
!(Objectscxx . . $ Objects.[killer_objnum].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!)) { |
| 6857 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bad hit_objnum(%d) or killer_objnum(%d) in MultiDoRobotDamage()\n", hit_objnum, killer_objnum); |
| 6858 |
// Int3(); // Get Jason, bad object number |
| 6859 |
return; |
| 6860 |
} |
| 6861 |
|
| 6862 |
damage = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6863 |
weaponid = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 6864 |
if ((!((Objectscxx . . $ Objects.[hit_objnum].flagscxx . . $ object#flags. & OF_DYINGcxx . . $ `Descent3/object_external.h:282:9`!) || (Objectscxx . . $ Objects.[hit_objnum].flagscxx . . $ object#flags. & OF_DEADcxx . . $ `Descent3/object_external.h:270:9`!))) && |
| 6865 |
Objectscxx . . $ Objects.[hit_objnum].typecxx . . $ object#type. != 255) |
| 6866 |
if ((!((Objectscxx . . $ Objects.[killer_objnum].flagscxx . . $ object#flags. & OF_DYINGcxx . . $ `Descent3/object_external.h:282:9`!) || (Objectscxx . . $ Objects.[killer_objnum].flagscxx . . $ object#flags. & OF_DEADcxx . . $ `Descent3/object_external.h:270:9`!))) && |
| 6867 |
Objectscxx . . $ Objects.[killer_objnum].typecxx . . $ object#type. != 255) { |
| 6868 |
// The damage type doesn't matter on the client side (only server side) -- so, this one is bogus |
| 6869 |
ApplyDamageToGenericcxx . . $ ApplyDamageToGeneric(5474b9d0c3697015).(&Objectscxx . . $ Objects.[hit_objnum], &Objectscxx . . $ Objects.[killer_objnum], GD_PHYSICScxx . . $ `Descent3/damage_external.h:38:9`!, damage, 1, weaponid); |
| 6870 |
} |
| 6871 |
} |
| 6872 |
|
| 6873 |
void MultiAddObjAnimUpdatecxx . . $ MultiAddObjAnimUpdate(d4f767463ce0a6b3).(int objnum) { |
| 6874 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6875 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 6876 |
// mprintf(0,"D`"); |
| 6877 |
for (int i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 6878 |
if (i == Player_numcxx . . $ Player_num.) |
| 6879 |
continue; |
| 6880 |
bool skip_this_obj = false; |
| 6881 |
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`!)) { |
| 6882 |
skip_this_obj = false; |
| 6883 |
// Check to see if this robot is on the list already |
| 6884 |
for (int b = 0; b < Num_changed_animcxx . . $ Num_changed_anim.[i]; b++) { |
| 6885 |
if (Changed_animcxx . . $ Changed_anim.[b][i] == Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.) { |
| 6886 |
skip_this_obj = true; |
| 6887 |
break; |
| 6888 |
} |
| 6889 |
} |
| 6890 |
if (skip_this_obj == false) { |
| 6891 |
if (Num_changed_animcxx . . $ Num_changed_anim.[i] < MAX_CHANGED_OBJECTScxx . . $ `Descent3/multi_server.h:30:9`!) { |
| 6892 |
Changed_animcxx . . $ Changed_anim.[Num_changed_animcxx . . $ Num_changed_anim.[i]][i] = Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.; |
| 6893 |
Num_changed_animcxx . . $ Num_changed_anim.[i]++; |
| 6894 |
} |
| 6895 |
} |
| 6896 |
} |
| 6897 |
} |
| 6898 |
} |
| 6899 |
|
| 6900 |
int MultiStuffObjAnimUpdatecxx . . $ MultiStuffObjAnimUpdate(9bed83f5e0cbe331).(uint16_tcxx . . $ uint16_t# objnum, uint8_tcxx . . $ uint8_t# *data) { |
| 6901 |
custom_animcxx . . $ custom_anim# multi_anim_info; |
| 6902 |
int count = 0; |
| 6903 |
int size = 0; |
| 6904 |
|
| 6905 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 6906 |
BailOnMultiplayercxx . . $ BailOnMultiplayer(85c52e162fed56f9).(NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 6907 |
return 0; |
| 6908 |
} |
| 6909 |
|
| 6910 |
// mprintf(0,"MultiStuffObjAnimUpdate Sending object %d\n",objnum); |
| 6911 |
if (ObjGetAnimUpdatecxx . . $ ObjGetAnimUpdate(6db95621231b744d).(objnum, &multi_anim_info)) // Checks if obj is still alive and all |
| 6912 |
{ |
| 6913 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 6914 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ANIM_UPDATEcxx . . $ `Descent3/multi.h:573:9`!, data, &count); |
| 6915 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(objnum, data, &count); |
| 6916 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(multi_anim_info.server_timecxx . . $ custom_anim#server_time., data, &count); |
| 6917 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(multi_anim_info.server_anim_framecxx . . $ custom_anim#server_anim_frame., data, &count); |
| 6918 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(multi_anim_info.anim_start_framecxx . . $ custom_anim#anim_start_frame., data, &count); |
| 6919 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(multi_anim_info.anim_end_framecxx . . $ custom_anim#anim_end_frame., data, &count); |
| 6920 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(multi_anim_info.anim_timecxx . . $ custom_anim#anim_time., data, &count); |
| 6921 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(multi_anim_info.max_speedcxx . . $ custom_anim#max_speed., data, &count); |
| 6922 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(multi_anim_info.flagscxx . . $ custom_anim#flags., data, &count); |
| 6923 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(multi_anim_info.anim_sound_indexcxx . . $ custom_anim#anim_sound_index., data, &count); |
| 6924 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 6925 |
return count; |
| 6926 |
} |
| 6927 |
return 0; |
| 6928 |
} |
| 6929 |
|
| 6930 |
void MultiDoObjAnimUpdatecxx . . $ MultiDoObjAnimUpdate(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6931 |
custom_animcxx . . $ custom_anim# multi_anim_info; |
| 6932 |
int objnum; |
| 6933 |
int count = 0; |
| 6934 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6935 |
// mprintf(0,"R`"); |
| 6936 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6937 |
int serverobjnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 6938 |
objnum = Server_object_listcxx . . $ Server_object_list.[serverobjnum]; |
| 6939 |
multi_anim_info.server_timecxx . . $ custom_anim#server_time. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6940 |
multi_anim_info.server_anim_framecxx . . $ custom_anim#server_anim_frame. = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 6941 |
multi_anim_info.anim_start_framecxx . . $ custom_anim#anim_start_frame. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6942 |
multi_anim_info.anim_end_framecxx . . $ custom_anim#anim_end_frame. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6943 |
multi_anim_info.anim_timecxx . . $ custom_anim#anim_time. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6944 |
multi_anim_info.max_speedcxx . . $ custom_anim#max_speed. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 6945 |
multi_anim_info.flagscxx . . $ custom_anim#flags. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6946 |
multi_anim_info.anim_sound_indexcxx . . $ custom_anim#anim_sound_index. = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 6947 |
|
| 6948 |
if (objnum == 65535) { |
| 6949 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "bad objnum in MultiDoObjAnimUpdate() server=%d\n", serverobjnum); |
| 6950 |
// Int3(); // Get Jason, bad object number |
| 6951 |
return; |
| 6952 |
} |
| 6953 |
|
| 6954 |
if (Objectscxx . . $ Objects.[objnum].typecxx . . $ object#type. != 255) { |
| 6955 |
ObjSetAnimUpdatecxx . . $ ObjSetAnimUpdate(fed6272ca188c09c).(objnum, &multi_anim_info); |
| 6956 |
} |
| 6957 |
} |
| 6958 |
|
| 6959 |
void MultiDoPlay3dSoundcxx . . $ MultiDoPlay3dSound(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 6960 |
int objnum; |
| 6961 |
int16_t soundidx; |
| 6962 |
int count = 0; |
| 6963 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6964 |
|
| 6965 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 6966 |
int serverobjnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 6967 |
objnum = Server_object_listcxx . . $ Server_object_list.[serverobjnum]; |
| 6968 |
|
| 6969 |
soundidx = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 6970 |
uint8_tcxx . . $ uint8_t# priority = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 6971 |
|
| 6972 |
if (objnum == 65535 || !(Objectscxx . . $ Objects.[objnum].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!)) { |
| 6973 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bad server objnum(%d) in MultiDoPlay3dSound().\n", serverobjnum); |
| 6974 |
// Int3(); // Get Jason, bad object number |
| 6975 |
return; |
| 6976 |
} |
| 6977 |
|
| 6978 |
Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(7fd84bfdbf757f76).(soundidx, &Objectscxx . . $ Objects.[objnum], priority); |
| 6979 |
} |
| 6980 |
|
| 6981 |
void MultiPlay3dSoundcxx . . $ MultiPlay3dSound(f056c30c88236a5f).(int16_t soundidx, uint16_tcxx . . $ uint16_t# objnum, int priority) { |
| 6982 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 6983 |
int count = 0; |
| 6984 |
int size = 0; |
| 6985 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 6986 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 6987 |
// mprintf(0,"^");//KBTEST |
| 6988 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAY_3D_SOUND_FROM_OBJcxx . . $ `Descent3/multi.h:576:9`!, data, &count); |
| 6989 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(objnum, data, &count); |
| 6990 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(soundidx, data, &count); |
| 6991 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(priority, data, &count); |
| 6992 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 6993 |
|
| 6994 |
// Add it to the outgoing queue. The MultiSendRobotFireSound() function will actually send it |
| 6995 |
for (int i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 6996 |
if (i == Player_numcxx . . $ Player_num.) |
| 6997 |
continue; |
| 6998 |
|
| 6999 |
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`!)) { |
| 7000 |
if (Multi_send_sizecxx . . $ Multi_send_size.[i] + count >= MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!) |
| 7001 |
MultiSendFullPacketcxx . . $ MultiSendFullPacket(3e454b8ccf442868).(i, 0); |
| 7002 |
|
| 7003 |
memcpy(&Multi_send_buffercxx . . $ Multi_send_buffer.[i][Multi_send_sizecxx . . $ Multi_send_size.[i]], data, count); |
| 7004 |
Multi_send_sizecxx . . $ Multi_send_size.[i] += count; |
| 7005 |
MultiSendFullPacketcxx . . $ MultiSendFullPacket(3e454b8ccf442868).(i, 0); |
| 7006 |
} |
| 7007 |
} |
| 7008 |
} |
| 7009 |
|
| 7010 |
void MultiSendRobotFireSoundcxx . . $ MultiSendRobotFireSound(10c3cfb854788893).(int16_t soundidx, uint16_tcxx . . $ uint16_t# objnum) { |
| 7011 |
int size; |
| 7012 |
int count = 0; |
| 7013 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7014 |
// mprintf(0,"&");//KBTEST |
| 7015 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7016 |
// mprintf(0,"Sending Robot %d fire sound.\n",objnum); |
| 7017 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[objnum]; |
| 7018 |
|
| 7019 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(obj->flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 7020 |
|
| 7021 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ROBOT_FIRE_SOUNDcxx . . $ `Descent3/multi.h:578:9`!, data, &count); |
| 7022 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(objnum, data, &count); |
| 7023 |
|
| 7024 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(soundidx, data, &count); |
| 7025 |
|
| 7026 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7027 |
|
| 7028 |
// Add it to the outgoing queue. The MultiSendRobotFireSound() function will actually send it |
| 7029 |
for (int i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 7030 |
if (i == Player_numcxx . . $ Player_num.) |
| 7031 |
continue; |
| 7032 |
|
| 7033 |
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`!)) { |
| 7034 |
if (Multi_send_sizecxx . . $ Multi_send_size.[i] + count >= MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!) |
| 7035 |
MultiSendFullPacketcxx . . $ MultiSendFullPacket(3e454b8ccf442868).(i, 0); |
| 7036 |
|
| 7037 |
memcpy(&Multi_send_buffercxx . . $ Multi_send_buffer.[i][Multi_send_sizecxx . . $ Multi_send_size.[i]], data, count); |
| 7038 |
Multi_send_sizecxx . . $ Multi_send_size.[i] += count; |
| 7039 |
MultiSendFullPacketcxx . . $ MultiSendFullPacket(3e454b8ccf442868).(i, 0); |
| 7040 |
} |
| 7041 |
} |
| 7042 |
} |
| 7043 |
|
| 7044 |
void MultiDoRobotFireSoundcxx . . $ MultiDoRobotFireSound(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7045 |
int objnum; |
| 7046 |
int16_t soundidx; |
| 7047 |
int count = 0; |
| 7048 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7049 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7050 |
|
| 7051 |
int serverobjnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7052 |
objnum = Server_object_listcxx . . $ Server_object_list.[serverobjnum]; |
| 7053 |
soundidx = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 7054 |
|
| 7055 |
if (objnum == 65535 || !(Objectscxx . . $ Objects.[objnum].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!)) { |
| 7056 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bad server objnum(%d) in MultiDoRobotFireSound().Objnum = %d\n", serverobjnum, objnum); |
| 7057 |
// Int3(); // Get Jason, bad object number |
| 7058 |
return; |
| 7059 |
} |
| 7060 |
Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(7fd84bfdbf757f76).(soundidx, &Objectscxx . . $ Objects.[objnum]); |
| 7061 |
} |
| 7062 |
|
| 7063 |
void MultiAddObjTurretUpdatecxx . . $ MultiAddObjTurretUpdate(d4f767463ce0a6b3).(int objnum) { |
| 7064 |
|
| 7065 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7066 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 7067 |
|
| 7068 |
for (int i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 7069 |
if (i == Player_numcxx . . $ Player_num.) |
| 7070 |
continue; |
| 7071 |
bool skip_this_obj = false; |
| 7072 |
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`!)) { |
| 7073 |
skip_this_obj = false; |
| 7074 |
// Check to see if this robot is on the list already |
| 7075 |
for (int b = 0; b < Num_changed_turretcxx . . $ Num_changed_turret.[i]; b++) { |
| 7076 |
if (Changed_turretcxx . . $ Changed_turret.[b][i] == Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.) { |
| 7077 |
skip_this_obj = true; |
| 7078 |
break; |
| 7079 |
} |
| 7080 |
} |
| 7081 |
if (skip_this_obj == false) { |
| 7082 |
if (Num_changed_turretcxx . . $ Num_changed_turret.[i] < MAX_CHANGED_OBJECTScxx . . $ `Descent3/multi_server.h:30:9`!) { |
| 7083 |
Changed_turretcxx . . $ Changed_turret.[Num_changed_turretcxx . . $ Num_changed_turret.[i]][i] = Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.; |
| 7084 |
Num_changed_turretcxx . . $ Num_changed_turret.[i]++; |
| 7085 |
} |
| 7086 |
} |
| 7087 |
} |
| 7088 |
} |
| 7089 |
} |
| 7090 |
|
| 7091 |
int MultiStuffTurretUpdatecxx . . $ MultiStuffTurretUpdate(9bed83f5e0cbe331).(uint16_tcxx . . $ uint16_t# objnum, uint8_tcxx . . $ uint8_t# *data) { |
| 7092 |
int count = 0; |
| 7093 |
int size = 0; |
| 7094 |
multi_turretcxx . . $ multi_turret# multi_turret_info; |
| 7095 |
// mprintf(0,"MultiStuffTurretUpdate Sending object %d\n",objnum); |
| 7096 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 7097 |
BailOnMultiplayercxx . . $ BailOnMultiplayer(85c52e162fed56f9).(NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 7098 |
return 0; |
| 7099 |
} |
| 7100 |
|
| 7101 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[objnum]; |
| 7102 |
polyobj_infocxx . . $ polyobj_info# *p_info = &obj->rtypecxx . . $ object#rtype..pobj_infocxx . . $ object#$anonymous_type_10#pobj_info.; |
| 7103 |
if ((objnum >= 0) && (obj->typecxx . . $ object#type. != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) && (obj->typecxx . . $ object#type. != OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) && (obj->flagscxx . . $ object#flags. & OF_POLYGON_OBJECTcxx . . $ `Descent3/object_external.h:281:9`!) && |
| 7104 |
(p_info->multi_turret_infocxx . . $ polyobj_info#multi_turret_info..num_turretscxx . . $ multi_turret#num_turrets.)) { |
| 7105 |
int i; |
| 7106 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 7107 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_TURRET_UPDATEcxx . . $ `Descent3/multi.h:580:9`!, data, &count); |
| 7108 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(objnum, data, &count); |
| 7109 |
|
| 7110 |
multi_turret_info.keyframescxx . . $ multi_turret#keyframes. = (float *)&turret_holdercxx . . $ turret_holder.; |
| 7111 |
ObjGetTurretUpdatecxx . . $ ObjGetTurretUpdate(5fa85d5dddf7408c).(objnum, &multi_turret_info); |
| 7112 |
|
| 7113 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(multi_turret_info.timecxx . . $ multi_turret#time., data, &count); |
| 7114 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(multi_turret_info.num_turretscxx . . $ multi_turret#num_turrets., data, &count); |
| 7115 |
|
| 7116 |
for (i = 0; i < multi_turret_info.num_turretscxx . . $ multi_turret#num_turrets.; i++) { |
| 7117 |
if (MAX_COOP_TURRETScxx . . $ `Descent3/multi.cpp:1800:9`! > i) |
| 7118 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(multi_turret_info.keyframescxx . . $ multi_turret#keyframes.[i], data, &count); |
| 7119 |
} |
| 7120 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7121 |
} |
| 7122 |
|
| 7123 |
return count; |
| 7124 |
} |
| 7125 |
|
| 7126 |
void MultiDoTurretUpdatecxx . . $ MultiDoTurretUpdate(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7127 |
|
| 7128 |
multi_turretcxx . . $ multi_turret# multi_turret_info; |
| 7129 |
int objnum; |
| 7130 |
uint16_tcxx . . $ uint16_t# num_turrets; |
| 7131 |
float turr_time; |
| 7132 |
int count = 0; |
| 7133 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7134 |
|
| 7135 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7136 |
|
| 7137 |
int serverobjnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7138 |
objnum = Server_object_listcxx . . $ Server_object_list.[serverobjnum]; |
| 7139 |
|
| 7140 |
if (objnum == 65535 || !(Objectscxx . . $ Objects.[objnum].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!)) { |
| 7141 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bad server objnum(%d) in MultiDoTurretUpdate().\n", serverobjnum); |
| 7142 |
// Int3(); // Get Jason , bad object number |
| 7143 |
return; |
| 7144 |
} |
| 7145 |
|
| 7146 |
turr_time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 7147 |
num_turrets = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7148 |
multi_turret_info.keyframescxx . . $ multi_turret#keyframes. = (float *)&turret_holdercxx . . $ turret_holder.; |
| 7149 |
multi_turret_info.num_turretscxx . . $ multi_turret#num_turrets. = num_turrets; |
| 7150 |
for (int i = 0; i < num_turrets; i++) { |
| 7151 |
if (MAX_COOP_TURRETScxx . . $ `Descent3/multi.cpp:1800:9`! > i) |
| 7152 |
multi_turret_info.keyframescxx . . $ multi_turret#keyframes.[i] = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 7153 |
} |
| 7154 |
|
| 7155 |
if (Objectscxx . . $ Objects.[objnum].typecxx . . $ object#type. != 255) { |
| 7156 |
ObjSetTurretUpdatecxx . . $ ObjSetTurretUpdate(5fa85d5dddf7408c).(objnum, &multi_turret_info); |
| 7157 |
} |
| 7158 |
} |
| 7159 |
|
| 7160 |
void MultiSendClientInventoryUseItemcxx . . $ MultiSendClientInventoryUseItem(3e454b8ccf442868).(int type, int id) { |
| 7161 |
if (id == -1) { |
| 7162 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Asking server to use objnum %d\n", OBJNUM(ObjGet(type))); |
| 7163 |
} else { |
| 7164 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Asking server to use T=%d ID=%d\n", type, id); |
| 7165 |
} |
| 7166 |
|
| 7167 |
int size = 0; |
| 7168 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7169 |
int count = 0; |
| 7170 |
// Client sends this only |
| 7171 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7172 |
|
| 7173 |
if (id != -1) { |
| 7174 |
// type/id use |
| 7175 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_CLIENT_USE_INVENTORY_ITEMcxx . . $ `Descent3/multi.h:581:9`!, data, &count, 1); |
| 7176 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(type, data, &count); |
| 7177 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(MultiGetMatchChecksumcxx . . $ MultiGetMatchChecksum(58c590d1186ea715).(type, id), data, &count); |
| 7178 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7179 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 7180 |
|
| 7181 |
} else { |
| 7182 |
// object use |
| 7183 |
int local_objhandle = type; |
| 7184 |
objectcxx . . $ object# *local_obj = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(local_objhandle); |
| 7185 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(local_obj); |
| 7186 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(local_obj->type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 7187 |
|
| 7188 |
if (local_obj) { |
| 7189 |
int server_objnum = Local_object_listcxx . . $ Local_object_list.[OBJNUMcxx . . $ `Descent3/object.h:700:9`!(local_obj)]; |
| 7190 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(server_objnum != 65535); |
| 7191 |
|
| 7192 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Inven Use: Requesting to use server objnum %d. T=%d i=%d\n", |
| 7193 |
server_objnum, |
| 7194 |
local_obj->type, |
| 7195 |
local_obj->id); |
| 7196 |
|
| 7197 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_CLIENT_USE_INVENTORY_ITEMcxx . . $ `Descent3/multi.h:581:9`!, data, &count, 1); |
| 7198 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(server_objnum, data, &count); |
| 7199 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(0xFFFFFFFF, data, &count); |
| 7200 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7201 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 7202 |
} |
| 7203 |
} |
| 7204 |
} |
| 7205 |
|
| 7206 |
void MultiDoClientInventoryUseItemcxx . . $ MultiDoClientInventoryUseItem(ea2b65c19bfee284).(int slot, uint8_tcxx . . $ uint8_t# *data) { |
| 7207 |
int count = 0; |
| 7208 |
int type; |
| 7209 |
int id; |
| 7210 |
uint32_tcxx . . $ uint32_t# hash; |
| 7211 |
|
| 7212 |
// Only the server receives this |
| 7213 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7214 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7215 |
|
| 7216 |
type = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7217 |
hash = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 7218 |
|
| 7219 |
bool is_counter_measure = false; |
| 7220 |
|
| 7221 |
if (hash == 0xFFFFFFFF) { |
| 7222 |
// object use |
| 7223 |
int server_objnum; |
| 7224 |
server_objnum = type; |
| 7225 |
|
| 7226 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Inven: use request objnum %d\n", server_objnum); |
| 7227 |
|
| 7228 |
// the objnum coming in better be in our object list |
| 7229 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(server_objnum >= 0 && server_objnum < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!); |
| 7230 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[server_objnum].type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 7231 |
|
| 7232 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client is asking me to use objnum %d\n", server_objnum); |
| 7233 |
|
| 7234 |
// convert type to objhandle |
| 7235 |
type = Objectscxx . . $ Objects.[server_objnum].handlecxx . . $ object#handle.; |
| 7236 |
id = -1; |
| 7237 |
} else { |
| 7238 |
// type/id use |
| 7239 |
if (type == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) { |
| 7240 |
id = MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(hash); |
| 7241 |
is_counter_measure = true; |
| 7242 |
} else { |
| 7243 |
id = MultiMatchGenericcxx . . $ MultiMatchGeneric(4c679297bf94b9eb).(hash); |
| 7244 |
} |
| 7245 |
|
| 7246 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client is asking me to use T=%d ID=%d\n", type, id); |
| 7247 |
} |
| 7248 |
|
| 7249 |
if (is_counter_measure) { |
| 7250 |
if (Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..FindPoscxx . . $ Inventory#FindPos(cf9ef193275fa6d8).(type, id)) { |
| 7251 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "I found it, so I'm going to use it\n"); |
| 7252 |
if (Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..UsePoscxx . . $ Inventory#UsePos(39516aeee13ca5ab).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.])) { |
| 7253 |
// Tell clients to remove this item |
| 7254 |
MultiSendInventoryRemoveItemcxx . . $ MultiSendInventoryRemoveItem(b1146eedae1e1d0b).(slot, type, id); |
| 7255 |
} |
| 7256 |
} else { |
| 7257 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "But I couldn't find it in my copy of his inventory\n"); |
| 7258 |
} |
| 7259 |
} else { |
| 7260 |
if (Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..FindPoscxx . . $ Inventory#FindPos(cf9ef193275fa6d8).(type, id)) { |
| 7261 |
if (id == -1) { |
| 7262 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "I found it, so I'm going to use it, type=%d id=%d\n", type, id); |
| 7263 |
} else { |
| 7264 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "I found it, so I'm going to use it, handle=0x%x id=%d\n", type, id); |
| 7265 |
} |
| 7266 |
|
| 7267 |
if (Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..UsePoscxx . . $ Inventory#UsePos(39516aeee13ca5ab).(&Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.])) { |
| 7268 |
// Tell clients to remove this item |
| 7269 |
MultiSendInventoryRemoveItemcxx . . $ MultiSendInventoryRemoveItem(b1146eedae1e1d0b).(slot, type, id); |
| 7270 |
} |
| 7271 |
} else { |
| 7272 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "But I couldn't find it in my copy of his inventory\n"); |
| 7273 |
} |
| 7274 |
} |
| 7275 |
} |
| 7276 |
|
| 7277 |
// Handle a remove item from inventory |
| 7278 |
void MultiDoClientInventoryRemoveItemcxx . . $ MultiDoClientInventoryRemoveItem(ea2b65c19bfee284).(int slot, uint8_tcxx . . $ uint8_t# *data) { |
| 7279 |
int count = 0; |
| 7280 |
int type; |
| 7281 |
int id; |
| 7282 |
uint32_tcxx . . $ uint32_t# hash; |
| 7283 |
int pnum; |
| 7284 |
|
| 7285 |
// Only the server receives this |
| 7286 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7287 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7288 |
|
| 7289 |
type = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7290 |
hash = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 7291 |
pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 7292 |
|
| 7293 |
if (hash == 0xFFFFFFFF) { |
| 7294 |
// object given |
| 7295 |
id = -1; |
| 7296 |
|
| 7297 |
// convert server objnum to a local objnum |
| 7298 |
type = Server_object_listcxx . . $ Server_object_list.[type]; |
| 7299 |
|
| 7300 |
// the objnum coming in better be in our object list |
| 7301 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(type >= 0 && type < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!); |
| 7302 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[type].type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 7303 |
|
| 7304 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server is telling me to remove objnum %d\n", type); |
| 7305 |
|
| 7306 |
// convert type to objhandle |
| 7307 |
type = Objectscxx . . $ Objects.[type].handlecxx . . $ object#handle.; |
| 7308 |
|
| 7309 |
Playerscxx . . $ Players.[pnum].inventorycxx . . $ player#inventory..Removecxx . . $ Inventory#Remove(cf9ef193275fa6d8).(type, id); |
| 7310 |
|
| 7311 |
} else { |
| 7312 |
|
| 7313 |
if (type == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) { |
| 7314 |
id = MultiMatchWeaponcxx . . $ MultiMatchWeapon(4c679297bf94b9eb).(hash); |
| 7315 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server is telling me to remove T=%d ID=%d from %d\n", type, id, pnum); |
| 7316 |
Playerscxx . . $ Players.[pnum].counter_measurescxx . . $ player#counter_measures..Removecxx . . $ Inventory#Remove(cf9ef193275fa6d8).(type, id); |
| 7317 |
} else { |
| 7318 |
id = MultiMatchGenericcxx . . $ MultiMatchGeneric(4c679297bf94b9eb).(hash); |
| 7319 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server is telling me to remove T=%d ID=%d from %d\n", type, id, pnum); |
| 7320 |
Playerscxx . . $ Players.[pnum].inventorycxx . . $ player#inventory..Removecxx . . $ Inventory#Remove(cf9ef193275fa6d8).(type, id); |
| 7321 |
} |
| 7322 |
} |
| 7323 |
} |
| 7324 |
|
| 7325 |
// Tell the clients to remove an item from a player's inventory |
| 7326 |
void MultiSendInventoryRemoveItemcxx . . $ MultiSendInventoryRemoveItem(b1146eedae1e1d0b).(int slot, int type, int id) { |
| 7327 |
if (id == -1) { |
| 7328 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Telling clients to remove objnum %d from %d\n", OBJNUM(ObjGet(type)), slot); |
| 7329 |
} else { |
| 7330 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Telling clients to remove inven item T=%d ID=%d from %d\n", type, id, slot); |
| 7331 |
} |
| 7332 |
|
| 7333 |
int size = 0; |
| 7334 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7335 |
int count = 0; |
| 7336 |
|
| 7337 |
if (id == -1) { |
| 7338 |
objectcxx . . $ object# *o = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(type); |
| 7339 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(o); |
| 7340 |
if (o) { |
| 7341 |
int objnum = OBJNUMcxx . . $ `Descent3/object.h:700:9`!(o); |
| 7342 |
|
| 7343 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7344 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REMOVE_INVENTORY_ITEMcxx . . $ `Descent3/multi.h:583:9`!, data, &count, 1); |
| 7345 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(objnum, data, &count); |
| 7346 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(0xFFFFFFFF, data, &count); |
| 7347 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 7348 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7349 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, false); |
| 7350 |
} |
| 7351 |
|
| 7352 |
} else { |
| 7353 |
// type/id |
| 7354 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7355 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REMOVE_INVENTORY_ITEMcxx . . $ `Descent3/multi.h:583:9`!, data, &count, 1); |
| 7356 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).((uint16_tcxx . . $ uint16_t#)type, data, &count); |
| 7357 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(MultiGetMatchChecksumcxx . . $ MultiGetMatchChecksum(58c590d1186ea715).(type, id), data, &count); |
| 7358 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 7359 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7360 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, false); |
| 7361 |
} |
| 7362 |
} |
| 7363 |
|
| 7364 |
void MultiSetAudioTauntTimecxx . . $ MultiSetAudioTauntTime(1746e8aa98ca1bc0).(float time, int to_who) { |
| 7365 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7366 |
|
| 7367 |
taunt_SetDelayTimecxx . . $ taunt_SetDelayTime(9364e6e7bff7660).(time); |
| 7368 |
time = taunt_DelayTimecxx . . $ taunt_DelayTime(9b8c9e39889c762c).(); // make sure it is valid |
| 7369 |
|
| 7370 |
int size = 0; |
| 7371 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7372 |
int count = 0; |
| 7373 |
|
| 7374 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_SERVER_AUDIOTAUNT_TIMEcxx . . $ `Descent3/multi.h:641:9`!, data, &count, 1); |
| 7375 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(time, data, &count); |
| 7376 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7377 |
|
| 7378 |
if (to_who == -1) { |
| 7379 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count); |
| 7380 |
} else { |
| 7381 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(to_who >= 0 && to_who < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!); |
| 7382 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!((NetPlayers[to_who].flags & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) && |
| 7383 |
(NetPlayers[to_who].sequence == NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!)); |
| 7384 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[to_who].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 7385 |
} |
| 7386 |
} |
| 7387 |
|
| 7388 |
void MultiDoAudioTauntTimecxx . . $ MultiDoAudioTauntTime(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7389 |
int count = 0; |
| 7390 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7391 |
|
| 7392 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7393 |
|
| 7394 |
float time = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 7395 |
taunt_SetDelayTimecxx . . $ taunt_SetDelayTime(9364e6e7bff7660).(time); |
| 7396 |
} |
| 7397 |
|
| 7398 |
void MultiAddObjWBAnimUpdatecxx . . $ MultiAddObjWBAnimUpdate(d4f767463ce0a6b3).(int objnum) { |
| 7399 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7400 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 7401 |
// mprintf(0,"D`"); |
| 7402 |
for (int i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 7403 |
if (i == Player_numcxx . . $ Player_num.) |
| 7404 |
continue; |
| 7405 |
bool skip_this_obj = false; |
| 7406 |
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`!)) { |
| 7407 |
skip_this_obj = false; |
| 7408 |
// Check to see if this robot is on the list already |
| 7409 |
for (int b = 0; b < Num_changed_wb_animcxx . . $ Num_changed_wb_anim.[i]; b++) { |
| 7410 |
if (Changed_wb_animcxx . . $ Changed_wb_anim.[b][i] == Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.) { |
| 7411 |
skip_this_obj = true; |
| 7412 |
break; |
| 7413 |
} |
| 7414 |
} |
| 7415 |
if (skip_this_obj == false) { |
| 7416 |
if (Num_changed_wb_animcxx . . $ Num_changed_wb_anim.[i] < MAX_CHANGED_OBJECTScxx . . $ `Descent3/multi_server.h:30:9`!) { |
| 7417 |
Changed_wb_animcxx . . $ Changed_wb_anim.[Num_changed_wb_animcxx . . $ Num_changed_wb_anim.[i]][i] = Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.; |
| 7418 |
Num_changed_wb_animcxx . . $ Num_changed_wb_anim.[i]++; |
| 7419 |
} |
| 7420 |
} |
| 7421 |
} |
| 7422 |
} |
| 7423 |
} |
| 7424 |
|
| 7425 |
int MultiStuffObjWBAnimUpdatecxx . . $ MultiStuffObjWBAnimUpdate(9bed83f5e0cbe331).(uint16_tcxx . . $ uint16_t# objnum, uint8_tcxx . . $ uint8_t# *data) { |
| 7426 |
// multi_anim multi_anim_info; |
| 7427 |
int count = 0; |
| 7428 |
int size = 0; |
| 7429 |
|
| 7430 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 7431 |
BailOnMultiplayercxx . . $ BailOnMultiplayer(85c52e162fed56f9).(NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 7432 |
return 0; |
| 7433 |
} |
| 7434 |
|
| 7435 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[objnum].flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 7436 |
// mprintf(0,"%");//KBTEST |
| 7437 |
/* |
| 7438 |
if(ObjGetAnimUpdate(objnum, &multi_anim_info)) // Checks if obj is still alive and all |
| 7439 |
{ |
| 7440 |
size=START_DATA (MP_ANIM_UPDATE,data,&count); |
| 7441 |
MultiAddUshort(objnum,data,&count); |
| 7442 |
MultiAddFloat (multi_anim_info.server_time,data,&count); |
| 7443 |
MultiAddUshort(multi_anim_info.server_anim_frame,data,&count); |
| 7444 |
MultiAddByte(multi_anim_info.anim_start_frame,data,&count); |
| 7445 |
MultiAddByte(multi_anim_info.anim_end_frame,data,&count); |
| 7446 |
MultiAddFloat (multi_anim_info.anim_time,data,&count); |
| 7447 |
MultiAddFloat (multi_anim_info.max_speed,data,&count); |
| 7448 |
MultiAddByte(multi_anim_info.flags,data,&count); |
| 7449 |
MultiAddShort(multi_anim_info.anim_sound_index,data,&count); |
| 7450 |
END_DATA (count,data,size); |
| 7451 |
return count; |
| 7452 |
} |
| 7453 |
*/ |
| 7454 |
return 0; |
| 7455 |
} |
| 7456 |
|
| 7457 |
void MultiDoObjWBAnimUpdatecxx . . $ MultiDoObjWBAnimUpdate(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7458 |
// multi_anim multi_anim_info; |
| 7459 |
// int objnum; |
| 7460 |
int count = 0; |
| 7461 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7462 |
// mprintf(0,"R`"); |
| 7463 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7464 |
/* |
| 7465 |
objnum = Server_object_list[MultiGetUshort (data,&count)]; |
| 7466 |
multi_anim_info.server_time = MultiGetFloat (data,&count); |
| 7467 |
multi_anim_info.server_anim_frame = MultiGetUshort (data,&count); |
| 7468 |
multi_anim_info.anim_start_frame = MultiGetByte (data,&count); |
| 7469 |
multi_anim_info.anim_end_frame = MultiGetByte (data,&count); |
| 7470 |
multi_anim_info.anim_time = MultiGetFloat (data,&count); |
| 7471 |
multi_anim_info.max_speed = MultiGetFloat (data,&count); |
| 7472 |
multi_anim_info.flags = MultiGetByte (data,&count); |
| 7473 |
multi_anim_info.anim_sound_index = MultiGetShort (data,&count); |
| 7474 |
if(Objects[objnum].type!=255) |
| 7475 |
{ |
| 7476 |
ObjSetWBAnimUpdate(objnum, &multi_anim_info); |
| 7477 |
} |
| 7478 |
*/ |
| 7479 |
} |
| 7480 |
|
| 7481 |
void MultiSendBytesSentcxx . . $ MultiSendBytesSent(d4f767463ce0a6b3).(int slot) { |
| 7482 |
int size = 0; |
| 7483 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7484 |
int count = 0; |
| 7485 |
// Server sends this only |
| 7486 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7487 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_SERVER_SENT_COUNTcxx . . $ `Descent3/multi.h:584:9`!, data, &count, 1); |
| 7488 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(NetPlayerscxx . . $ NetPlayers.[slot].total_bytes_sentcxx . . $ netplayer#total_bytes_sent., data, &count); |
| 7489 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7490 |
NetPlayerscxx . . $ NetPlayers.[slot].total_bytes_sentcxx . . $ netplayer#total_bytes_sent. = 0; |
| 7491 |
NetPlayerscxx . . $ NetPlayers.[slot].total_bytes_rcvdcxx . . $ netplayer#total_bytes_rcvd. = 0; |
| 7492 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[slot].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 7493 |
} |
| 7494 |
|
| 7495 |
#define PPS_MAXcxx . . $ `Descent3/multi.cpp:7495:9`! 10 |
| 7496 |
#define PPS_MINcxx . . $ `Descent3/multi.cpp:7496:9`! 2 |
| 7497 |
#define PING_FALLOFFcxx . . $ `Descent3/multi.cpp:7497:9`! 3.0 |
| 7498 |
|
| 7499 |
#define MINcxx . . $ `Descent3/multi.cpp:7499:9`!(a, b) ((a < b) ? a : b) |
| 7500 |
|
| 7501 |
void MultiDoBytesSentcxx . . $ MultiDoBytesSent(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7502 |
int count = 0; |
| 7503 |
uint32_tcxx . . $ uint32_t# server_sent; |
| 7504 |
float drop_ratio; |
| 7505 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7506 |
server_sent = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 7507 |
int dropped = server_sent - NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].total_bytes_rcvdcxx . . $ netplayer#total_bytes_rcvd.; |
| 7508 |
if (dropped > 0) { |
| 7509 |
drop_ratio = (float)NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].total_bytes_rcvdcxx . . $ netplayer#total_bytes_rcvd. / (float)server_sent; |
| 7510 |
float loss = 1 - drop_ratio; |
| 7511 |
int pct_loss = loss * 100; |
| 7512 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].percent_losscxx . . $ netplayer#percent_loss. = pct_loss; |
| 7513 |
|
| 7514 |
if (pct_loss > 15) { |
| 7515 |
if (Bandwidth_throttlecxx . . $ Bandwidth_throttle. >= 0) |
| 7516 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle.++; |
| 7517 |
else |
| 7518 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle. = 0; |
| 7519 |
} else if (pct_loss < 5) { |
| 7520 |
if (Bandwidth_throttlecxx . . $ Bandwidth_throttle. <= 0) |
| 7521 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle.--; |
| 7522 |
else |
| 7523 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle. = 0; |
| 7524 |
} |
| 7525 |
if (NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].ping_timecxx . . $ netplayer#ping_time. >= PING_FALLOFFcxx . . $ `Descent3/multi.cpp:7497:9`!) { |
| 7526 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle.--; |
| 7527 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle.--; |
| 7528 |
} |
| 7529 |
// mprintf_at(2,1,0,"Packet Loss: %d%% ",pct_loss); |
| 7530 |
} else { |
| 7531 |
// mprintf_at(2,1,0,"Packet Loss: 0%% "); |
| 7532 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].percent_losscxx . . $ netplayer#percent_loss. = 0; |
| 7533 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle.--; |
| 7534 |
} |
| 7535 |
if (Bandwidth_throttlecxx . . $ Bandwidth_throttle. >= 3) { |
| 7536 |
// Time to lower the pps setting! |
| 7537 |
if (NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].ppscxx . . $ netplayer#pps. > PPS_MINcxx . . $ `Descent3/multi.cpp:7496:9`!) { |
| 7538 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].ppscxx . . $ netplayer#pps.--; |
| 7539 |
MultiSendPPSSetcxx . . $ MultiSendPPSSet(d4f767463ce0a6b3).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].ppscxx . . $ netplayer#pps.); |
| 7540 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle. = 0; |
| 7541 |
} |
| 7542 |
} else if (Bandwidth_throttlecxx . . $ Bandwidth_throttle. <= -2) { |
| 7543 |
// Time to up the pps setting! |
| 7544 |
if (NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].ppscxx . . $ netplayer#pps. < MINcxx . . $ `Descent3/multi.cpp:7499:9`!(nw_ReccomendPPS(), Netgame.packets_per_second)) { |
| 7545 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].ppscxx . . $ netplayer#pps.++; |
| 7546 |
MultiSendPPSSetcxx . . $ MultiSendPPSSet(d4f767463ce0a6b3).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].ppscxx . . $ netplayer#pps.); |
| 7547 |
Bandwidth_throttlecxx . . $ Bandwidth_throttle. = 0; |
| 7548 |
} |
| 7549 |
} |
| 7550 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].total_bytes_rcvdcxx . . $ netplayer#total_bytes_rcvd. = 0; |
| 7551 |
} |
| 7552 |
|
| 7553 |
void MultiSendPPSSetcxx . . $ MultiSendPPSSet(d4f767463ce0a6b3).(int pps) { |
| 7554 |
int size = 0; |
| 7555 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7556 |
int count = 0; |
| 7557 |
// Client sends this only |
| 7558 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7559 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_CLIENT_SET_PPScxx . . $ `Descent3/multi.h:585:9`!, data, &count, 1); |
| 7560 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(pps, data, &count); |
| 7561 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Telling the server we want a PPS of %d\n", pps); |
| 7562 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7563 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 7564 |
} |
| 7565 |
|
| 7566 |
void MultiDoPPSSetcxx . . $ MultiDoPPSSet(fc0f0e1646c32816).(uint8_tcxx . . $ uint8_t# *data, int slot) { |
| 7567 |
int count = 0; |
| 7568 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7569 |
NetPlayerscxx . . $ NetPlayers.[slot].ppscxx . . $ netplayer#pps. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 7570 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "%s changed his PPS to %d\n", Players[slot].callsign, NetPlayers[slot].pps); |
| 7571 |
} |
| 7572 |
|
| 7573 |
void MultiSendGreetingscxx . . $ MultiSendGreetings(cb2f890c2fdad230).(uint32_tcxx . . $ uint32_t# id) { |
| 7574 |
int size = 0; |
| 7575 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7576 |
int count = 0; |
| 7577 |
// Client sends this only |
| 7578 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 7579 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_GREETINGS_FROM_CLIENTcxx . . $ `Descent3/multi.h:586:9`!, data, &count); |
| 7580 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(id, data, &count); |
| 7581 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Saying hello to the server\n"); |
| 7582 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7583 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&Netgamecxx . . $ Netgame..server_addresscxx . . $ netgame_info#server_address., data, count, 0); |
| 7584 |
} |
| 7585 |
|
| 7586 |
void MultiDoGreetingscxx . . $ MultiDoGreetings(b4ed6bda213be74).(uint8_tcxx . . $ uint8_t# *data, network_addresscxx . . $ network_address# *addr) { |
| 7587 |
int count = 0; |
| 7588 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7589 |
uint32_tcxx . . $ uint32_t# id = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 7590 |
int i; |
| 7591 |
// mprintf(0,"Got a greeting packet with an id of %d\n"); |
| 7592 |
for (i = 0; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 7593 |
// mprintf(0,"Netplayer[%d] has an id of %d\n",i,NetPlayers[i].secret_net_id); |
| 7594 |
if (NetPlayerscxx . . $ NetPlayers.[i].secret_net_idcxx . . $ netplayer#secret_net_id. == id) { |
| 7595 |
// Get the address |
| 7596 |
memcpy(&NetPlayerscxx . . $ NetPlayers.[i].addrcxx . . $ netplayer#addr., addr, sizeof(network_addresscxx . . $ network_address#)); |
| 7597 |
return; |
| 7598 |
} |
| 7599 |
} |
| 7600 |
} |
| 7601 |
|
| 7602 |
// Ask for a file from the client if you are the server |
| 7603 |
// Or, if you are the server, ask a client |
| 7604 |
// file_id = NETFILE_ID_???? type |
| 7605 |
// file_who = If you are the client who's file you want from the server |
| 7606 |
// who = player number of who you are asking for the file |
| 7607 |
void MultiAskForFilecxx . . $ MultiAskForFile(1dc4f76fb2e63523).(uint16_tcxx . . $ uint16_t# file_id, uint16_tcxx . . $ uint16_t# file_who, uint16_tcxx . . $ uint16_t# who) { |
| 7608 |
int size = 0; |
| 7609 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7610 |
int count = 0; |
| 7611 |
//@@mprintf(0,"Asking player %d for a file (%d) from player %d\n",who,file_id,file_who); |
| 7612 |
if (NetPlayerscxx . . $ NetPlayers.[who].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. != NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!) { |
| 7613 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "File already in progress, can't start another one!\n"); |
| 7614 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 7615 |
return; // Make sure a file isn't in progress |
| 7616 |
} |
| 7617 |
if (who == Player_numcxx . . $ Player_num.) { |
| 7618 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Can't send a file to myself!\n"); |
| 7619 |
return; |
| 7620 |
} |
| 7621 |
// Check to see if this file exists already |
| 7622 |
char *p = GetFileNameFromPlayerAndIDcxx . . $ GetFileNameFromPlayerAndID(744de07444492bc8).(file_who, file_id); |
| 7623 |
if (*p) { |
| 7624 |
if (CFES_ON_DISKcxx . . $ CFES_ON_DISK. == cfexistcxx . . $ cfexist(293b0826c8d9cb54).(pcxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).)) { |
| 7625 |
char szcrc[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 7626 |
char path[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 7627 |
char ext[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 7628 |
char file[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 7629 |
|
| 7630 |
ddio_SplitPathcxx . . $ ddio_SplitPath(b05ba7ab99603c07).(p, path, file, ext); |
| 7631 |
snprintf(szcrc, sizeof(szcrc), "_%.8x", cf_GetfileCRCcxx . . $ cf_GetfileCRC(eb3222378d8a05e0).(pcxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).)); |
| 7632 |
// See if the the CRC is already in the filename |
| 7633 |
if (strnicmpcxx . . $ `linux/linux_fix.h:44:9`!(szcrc, file + (strlen(file) - 9), 9) != 0) { |
| 7634 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Bad CRC on file %s! It must be corrupt! File will not be used, and is being deleted!\n", p); |
| 7635 |
ddio_DeleteFilecxx . . $ ddio_DeleteFile(5c4306d8553b3696).(p); |
| 7636 |
} else { |
| 7637 |
// Hey hey, we already have this file |
| 7638 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Using existing file: %s\n", p); |
| 7639 |
DoNextPlayerFilecxx . . $ DoNextPlayerFile(d4f767463ce0a6b3).(file_who); |
| 7640 |
return; |
| 7641 |
} |
| 7642 |
} |
| 7643 |
} else { |
| 7644 |
// No file |
| 7645 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "No custom file %d for player %d\n", file_id, file_who); |
| 7646 |
DoNextPlayerFilecxx . . $ DoNextPlayerFile(d4f767463ce0a6b3).(file_who); |
| 7647 |
return; |
| 7648 |
} |
| 7649 |
|
| 7650 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_FILE_REQcxx . . $ `Descent3/multi.h:590:9`!, data, &count); |
| 7651 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(file_id, data, &count); |
| 7652 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(file_who, data, &count); |
| 7653 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(Player_numcxx . . $ Player_num., data, &count); |
| 7654 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size); |
| 7655 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 7656 |
// If we are a server, send a request to the client asking for a file of theirs |
| 7657 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Asking client %d for a file.\n", who); |
| 7658 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[who].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 7659 |
NetPlayerscxx . . $ NetPlayers.[who].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_ASKINGcxx . . $ `Descent3/multi.h:686:9`!; |
| 7660 |
NetPlayerscxx . . $ NetPlayers.[who].file_xfer_poscxx . . $ netplayer#file_xfer_pos. = 0; |
| 7661 |
NetPlayerscxx . . $ NetPlayers.[who].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 7662 |
NetPlayerscxx . . $ NetPlayers.[who].file_xfer_whocxx . . $ netplayer#file_xfer_who. = file_who; |
| 7663 |
} else { |
| 7664 |
// If we are a client, ask the server for a file |
| 7665 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Asking server for a file.\n"); |
| 7666 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 7667 |
NetPlayerscxx . . $ NetPlayers.[file_who].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_ASKINGcxx . . $ `Descent3/multi.h:686:9`!; |
| 7668 |
NetPlayerscxx . . $ NetPlayers.[file_who].file_xfer_poscxx . . $ netplayer#file_xfer_pos. = 0; |
| 7669 |
NetPlayerscxx . . $ NetPlayers.[file_who].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 7670 |
NetPlayerscxx . . $ NetPlayers.[file_who].file_xfer_whocxx . . $ netplayer#file_xfer_who. = file_who; |
| 7671 |
} |
| 7672 |
} |
| 7673 |
|
| 7674 |
void MultiDoFileReqcxx . . $ MultiDoFileReq(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7675 |
int count = 0; |
| 7676 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7677 |
uint16_tcxx . . $ uint16_t# filenum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7678 |
uint16_tcxx . . $ uint16_t# filewho = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7679 |
uint16_tcxx . . $ uint16_t# playernum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7680 |
// If we are the server, someone want's a file. Either start sending it to them, or deny the request |
| 7681 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. == NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!) { |
| 7682 |
// FIXME!! Figure out what file to open |
| 7683 |
CFILEcxx . . $ CFILE# *cfp; |
| 7684 |
// char filename[_MAX_PATH]; |
| 7685 |
char filewithpath[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 7686 |
strcpy(filewithpath, GetFileNameFromPlayerAndIDcxx . . $ GetFileNameFromPlayerAndID(744de07444492bc8).(filewho, filenum)); |
| 7687 |
if (filewithpath[0] == 0) { |
| 7688 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a file request for a file that doesn't exist (%s).\n", filewithpath); |
| 7689 |
DenyFilecxx . . $ DenyFile(b1146eedae1e1d0b).(playernum, filenum, NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_whocxx . . $ netplayer#file_xfer_who.); |
| 7690 |
} else { |
| 7691 |
cfp = cfopencxx . . $ cfopen(7c7b94e455f1ae56).(filewithpathcxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d)., "rb"); |
| 7692 |
if (!cfp) { |
| 7693 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Couldn't open a file (%s) for transfer.\n", filewithpath); |
| 7694 |
DenyFilecxx . . $ DenyFile(b1146eedae1e1d0b).(playernum, filenum, NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_whocxx . . $ netplayer#file_xfer_who.); |
| 7695 |
return; |
| 7696 |
// We couldn't create the file, so cancel the attempt to transfer it. |
| 7697 |
} |
| 7698 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending first data chunk!\n"); |
| 7699 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_whocxx . . $ netplayer#file_xfer_who. = filewho; |
| 7700 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = cfp; |
| 7701 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. = 0; |
| 7702 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_SENDINGcxx . . $ `Descent3/multi.h:684:9`!; |
| 7703 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_total_lencxx . . $ netplayer#file_xfer_total_len. = cfp->sizecxx . . $ CFILE#size.; |
| 7704 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_idcxx . . $ netplayer#file_xfer_id. = filenum; |
| 7705 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "File size = %d\n", cfp->size); |
| 7706 |
SendDataChunkcxx . . $ SendDataChunk(d4f767463ce0a6b3).(playernum); |
| 7707 |
} |
| 7708 |
} else { |
| 7709 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a file request while one was already in progress!\n"); |
| 7710 |
DenyFilecxx . . $ DenyFile(b1146eedae1e1d0b).(playernum, filenum, NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_whocxx . . $ netplayer#file_xfer_who.); |
| 7711 |
} |
| 7712 |
} |
| 7713 |
|
| 7714 |
void DenyFilecxx . . $ DenyFile(b1146eedae1e1d0b).(int playernum, int filenum, int file_who) { |
| 7715 |
int size = 0; |
| 7716 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7717 |
int count = 0; |
| 7718 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_FILE_DENIEDcxx . . $ `Descent3/multi.h:591:9`!, outdata, &count); |
| 7719 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(filenum, outdata, &count); |
| 7720 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(Player_numcxx . . $ Player_num., outdata, &count); |
| 7721 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(file_who, outdata, &count); |
| 7722 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 7723 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 7724 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 7725 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[playernum].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, count); |
| 7726 |
} else { |
| 7727 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, count); |
| 7728 |
} |
| 7729 |
} |
| 7730 |
|
| 7731 |
void MultiCancelFilecxx . . $ MultiCancelFile(b1146eedae1e1d0b).(int playernum, int filenum, int file_who) { |
| 7732 |
int size = 0; |
| 7733 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7734 |
int count = 0; |
| 7735 |
// Send message to our peer and abort the xfer |
| 7736 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.) { |
| 7737 |
cfclosecxx . . $ cfclose(3639e799710acb68).(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 7738 |
} |
| 7739 |
|
| 7740 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_FILE_CANCELcxx . . $ `Descent3/multi.h:598:9`!, outdata, &count); |
| 7741 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(playernum, outdata, &count); |
| 7742 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(filenum, outdata, &count); |
| 7743 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(file_who, outdata, &count); |
| 7744 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 7745 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 7746 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. = 0; |
| 7747 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!; |
| 7748 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 7749 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[playernum].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, count); |
| 7750 |
} else { |
| 7751 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, count); |
| 7752 |
} |
| 7753 |
} |
| 7754 |
void MultiDoFileDeniedcxx . . $ MultiDoFileDenied(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7755 |
// We asked for a file, but the request was denied for some reason |
| 7756 |
int count = 0; |
| 7757 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7758 |
uint16_tcxx . . $ uint16_t# filenum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7759 |
uint16_tcxx . . $ uint16_t# playernum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7760 |
uint16_tcxx . . $ uint16_t# filewho = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7761 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a file denied packet from %d\n", playernum); |
| 7762 |
|
| 7763 |
DoNextPlayerFilecxx . . $ DoNextPlayerFile(d4f767463ce0a6b3).(filewho); |
| 7764 |
} |
| 7765 |
|
| 7766 |
void MultiDoFileDatacxx . . $ MultiDoFileData(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7767 |
// File data. We asked for it, now the server is sending it to us. |
| 7768 |
uint32_tcxx . . $ uint32_t# total_len; // Length of the entire file |
| 7769 |
uint32_tcxx . . $ uint32_t# curr_len; // Length of file sent so far |
| 7770 |
uint16_tcxx . . $ uint16_t# file_id; // Defines which file this is |
| 7771 |
uint16_tcxx . . $ uint16_t# playernum; // Who is sending us the file |
| 7772 |
uint16_tcxx . . $ uint16_t# data_len; // between 1-450 bytes |
| 7773 |
// uint16_t file_who; |
| 7774 |
int count = 0; |
| 7775 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7776 |
int outcount = 0; |
| 7777 |
int size; |
| 7778 |
|
| 7779 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7780 |
total_len = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 7781 |
curr_len = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); // Length of the file after before this data chunk |
| 7782 |
file_id = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7783 |
playernum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7784 |
// file_who = MultiGetUshort (data,&count); |
| 7785 |
data_len = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7786 |
// mprintf(0,"Got a data packet from %d\n",playernum); |
| 7787 |
if ((NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. == NETFILE_RECEIVINGcxx . . $ `Descent3/multi.h:685:9`!) || |
| 7788 |
(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. == NETFILE_ASKINGcxx . . $ `Descent3/multi.h:686:9`!)) { |
| 7789 |
|
| 7790 |
// Find out if this is the first packet of this file. if so, create and open the file |
| 7791 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. == 0) { |
| 7792 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Creating file...\n"); |
| 7793 |
CFILEcxx . . $ CFILE# *cfp; |
| 7794 |
// char filename[_MAX_PATH]; |
| 7795 |
char filewithpath[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 7796 |
strcpy(filewithpath, GetFileNameFromPlayerAndIDcxx . . $ GetFileNameFromPlayerAndID(744de07444492bc8).(playernum, file_id)); |
| 7797 |
|
| 7798 |
cfp = cfopencxx . . $ cfopen(7c7b94e455f1ae56).(filewithpathcxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d)., "wb"); |
| 7799 |
if (!cfp) { |
| 7800 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Can't create file %s\n", filewithpath); |
| 7801 |
// We couldn't create the file, so cancel the attempt to transfer it. |
| 7802 |
MultiCancelFilecxx . . $ MultiCancelFile(b1146eedae1e1d0b).(playernum, file_id, NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_whocxx . . $ netplayer#file_xfer_who.); |
| 7803 |
return; |
| 7804 |
} |
| 7805 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = cfp; |
| 7806 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_RECEIVINGcxx . . $ `Descent3/multi.h:685:9`!; |
| 7807 |
} |
| 7808 |
|
| 7809 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(NetPlayers[playernum].file_xfer_cfile); |
| 7810 |
// Write the data to the file |
| 7811 |
int data_wrote = cf_WriteBytescxx . . $ cf_WriteBytes(b35058f74b39c3a6).(data + count, data_len, NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 7812 |
if (data_wrote != data_len) { |
| 7813 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "cf_WriteBytes() should have written %d bytes, but only wrote %d!\n", data_len, data_wrote); |
| 7814 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 7815 |
} |
| 7816 |
|
| 7817 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. += data_len; |
| 7818 |
// See if this is the last data chunk |
| 7819 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. >= total_len) { |
| 7820 |
// We got the whole thing baby! |
| 7821 |
cfclosecxx . . $ cfclose(3639e799710acb68).(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 7822 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 7823 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. = 0; |
| 7824 |
DoNextPlayerFilecxx . . $ DoNextPlayerFile(d4f767463ce0a6b3).(playernum); |
| 7825 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Finished downloading file!\n"); |
| 7826 |
return; // Don't ack the last packet |
| 7827 |
} |
| 7828 |
// Ack the sender |
| 7829 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_FILE_ACKcxx . . $ `Descent3/multi.h:593:9`!, outdata, &outcount); |
| 7830 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(Player_numcxx . . $ Player_num., outdata, &outcount); |
| 7831 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos., outdata, &outcount); |
| 7832 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(outcount, outdata, size); |
| 7833 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 7834 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[playernum].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, outcount, true); |
| 7835 |
} else { |
| 7836 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, outcount, true); |
| 7837 |
} |
| 7838 |
} else { |
| 7839 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Received file transfer data from someone who we aren't expecting data from!\n"); |
| 7840 |
} |
| 7841 |
} |
| 7842 |
|
| 7843 |
void MultiDoFileAckcxx . . $ MultiDoFileAck(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7844 |
// If we are transferring a file, and someone ACK's us, simply send them the next bit of data they are waiting for |
| 7845 |
uint8_tcxx . . $ uint8_t# playernum; // Who is acking us |
| 7846 |
uint32_tcxx . . $ uint32_t# len_recvd; // Total number of bytes received so far |
| 7847 |
int count = 0; |
| 7848 |
|
| 7849 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7850 |
playernum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7851 |
len_recvd = MultiGetUintcxx . . $ MultiGetUint(3599f90e4cb334dc).(data, &count); |
| 7852 |
// mprintf(0,"Got a ACK packet from %d\n",playernum); |
| 7853 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. == NETFILE_SENDINGcxx . . $ `Descent3/multi.h:684:9`!) { |
| 7854 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. == len_recvd) { |
| 7855 |
SendDataChunkcxx . . $ SendDataChunk(d4f767463ce0a6b3).(playernum); |
| 7856 |
} else { |
| 7857 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // This shouldn't happen because the reliable network code should handle it |
| 7858 |
} |
| 7859 |
} else { |
| 7860 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Received an ACK from someone we weren't sending a file to!\n"); |
| 7861 |
} |
| 7862 |
} |
| 7863 |
|
| 7864 |
void SendDataChunkcxx . . $ SendDataChunk(d4f767463ce0a6b3).(int playernum) { |
| 7865 |
int outcount = 0; |
| 7866 |
static uint8_tcxx . . $ uint8_t# outdata[MAX_PACKET_SIZEcxx . . $ `lib/networking.h:321:9`!]; |
| 7867 |
static uint8_tcxx . . $ uint8_t# readbuf[MAX_PACKET_SIZEcxx . . $ `lib/networking.h:321:9`!]; |
| 7868 |
int size; |
| 7869 |
int dataread; |
| 7870 |
int done = 0; |
| 7871 |
// mprintf(0,"Sending a data chunk to %d.\n",playernum); |
| 7872 |
// Read the next chunk of the file and send it! |
| 7873 |
if ((DATA_CHUNK_SIZEcxx . . $ `Descent3/multi.cpp:1803:9`! + NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos.) > |
| 7874 |
(uint32_tcxx . . $ uint32_t#)NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.->sizecxx . . $ CFILE#size.) { |
| 7875 |
dataread = NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.->sizecxx . . $ CFILE#size. - NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos.; |
| 7876 |
// This is the end of the file |
| 7877 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "End of file detected!\n"); |
| 7878 |
done = 1; |
| 7879 |
} else { |
| 7880 |
dataread = DATA_CHUNK_SIZEcxx . . $ `Descent3/multi.cpp:1803:9`!; |
| 7881 |
} |
| 7882 |
|
| 7883 |
try { |
| 7884 |
cf_ReadBytescxx . . $ cf_ReadBytes(de6325ef3380a744).(readbuf, dataread, NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 7885 |
} catch (cfile_errorcxx . . $ cfile_error# *cfe) { |
| 7886 |
int t = cfe->read_writecxx . . $ cfile_error#read_write.; // this is is here to fix compile warning |
| 7887 |
// Woops, can't read the file, better error out! |
| 7888 |
MultiCancelFilecxx . . $ MultiCancelFile(b1146eedae1e1d0b).(playernum, NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_idcxx . . $ netplayer#file_xfer_id., NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_whocxx . . $ netplayer#file_xfer_who.); |
| 7889 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 7890 |
return; |
| 7891 |
} |
| 7892 |
|
| 7893 |
if (done) { |
| 7894 |
cfclosecxx . . $ cfclose(3639e799710acb68).(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 7895 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 7896 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. = 0; |
| 7897 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_flagscxx . . $ netplayer#file_xfer_flags. = NETFILE_NONEcxx . . $ `Descent3/multi.h:683:9`!; |
| 7898 |
} |
| 7899 |
// Send them the next chunk |
| 7900 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_FILE_DATAcxx . . $ `Descent3/multi.h:592:9`!, outdata, &outcount); |
| 7901 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_total_lencxx . . $ netplayer#file_xfer_total_len., outdata, &outcount); |
| 7902 |
MultiAddUintcxx . . $ MultiAddUint(c51d06dbd74b8495).(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos., outdata, &outcount); |
| 7903 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_idcxx . . $ netplayer#file_xfer_id., outdata, &outcount); |
| 7904 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 7905 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_whocxx . . $ netplayer#file_xfer_who., outdata, &outcount); |
| 7906 |
else |
| 7907 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(Player_numcxx . . $ Player_num., outdata, &outcount); |
| 7908 |
// MultiAddUshort (NetPlayers[playernum].file_xfer_who,outdata,&outcount); |
| 7909 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(dataread, outdata, &outcount); |
| 7910 |
memcpy(outdata + outcount, readbuf, dataread); |
| 7911 |
outcount += dataread; |
| 7912 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(outcount, outdata, size); |
| 7913 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 7914 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[playernum].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, outcount, true); |
| 7915 |
} else { |
| 7916 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, outcount, true); |
| 7917 |
} |
| 7918 |
NetPlayerscxx . . $ NetPlayers.[playernum].file_xfer_poscxx . . $ netplayer#file_xfer_pos. += dataread; |
| 7919 |
} |
| 7920 |
|
| 7921 |
void MultiDoFileCancelledcxx . . $ MultiDoFileCancelled(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 7922 |
uint16_tcxx . . $ uint16_t# playernum; // Who is telling us the file is cancelled |
| 7923 |
uint16_tcxx . . $ uint16_t# filewho; // Who's file is being cancelled |
| 7924 |
int count = 0; |
| 7925 |
|
| 7926 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 7927 |
playernum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7928 |
filewho = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 7929 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a cancelled packet from %d for %d\n", playernum, filewho); |
| 7930 |
if (NetPlayerscxx . . $ NetPlayers.[filewho].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.) { |
| 7931 |
char delfile[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 7932 |
strcpy(delfile, NetPlayerscxx . . $ NetPlayers.[filewho].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.->namecxx . . $ CFILE#name.); |
| 7933 |
cfclosecxx . . $ cfclose(3639e799710acb68).(NetPlayerscxx . . $ NetPlayers.[filewho].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile.); |
| 7934 |
NetPlayerscxx . . $ NetPlayers.[filewho].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 7935 |
ddio_DeleteFilecxx . . $ ddio_DeleteFile(5c4306d8553b3696).(delfile); |
| 7936 |
} |
| 7937 |
NetPlayerscxx . . $ NetPlayers.[filewho].file_xfer_cfilecxx . . $ netplayer#file_xfer_cfile. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 7938 |
NetPlayerscxx . . $ NetPlayers.[filewho].file_xfer_poscxx . . $ netplayer#file_xfer_pos. = 0; |
| 7939 |
DoNextPlayerFilecxx . . $ DoNextPlayerFile(d4f767463ce0a6b3).(filewho); |
| 7940 |
} |
| 7941 |
|
| 7942 |
// ddio_splitpath |
| 7943 |
void MultiSendClientCustomDatacxx . . $ MultiSendClientCustomData(3e454b8ccf442868).(int slot, int whoto) { |
| 7944 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 7945 |
char csum_filename[(_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2) + 64]; |
| 7946 |
char path[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 7947 |
char ext[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 7948 |
char file[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 7949 |
int count = 0; |
| 7950 |
int size_offset; |
| 7951 |
|
| 7952 |
//@@mprintf(0,"Sending player %d's data to %d.\n",slot,whoto); |
| 7953 |
|
| 7954 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYER_CUSTOM_DATAcxx . . $ `Descent3/multi.h:600:9`!, data, &count); |
| 7955 |
// Who we are talking about |
| 7956 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(slot, data, &count); |
| 7957 |
|
| 7958 |
// Send custom logo filename (all 0's if none) |
| 7959 |
csum_filename[0] = '\0'; |
| 7960 |
if (NetPlayerscxx . . $ NetPlayers.[slot].ship_logocxx . . $ netplayer#ship_logo.[0]) { |
| 7961 |
if (slot == Player_numcxx . . $ Player_num.) { |
| 7962 |
char szcrc[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 7963 |
ddio_SplitPathcxx . . $ ddio_SplitPath(b05ba7ab99603c07).(NetPlayerscxx . . $ NetPlayers.[slot].ship_logocxx . . $ netplayer#ship_logo., path, file, ext); |
| 7964 |
snprintf(szcrc, sizeof(szcrc), "_%.8x", cf_GetfileCRCcxx . . $ cf_GetfileCRC(eb3222378d8a05e0).(NetPlayerscxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).[slot].ship_logocxx . . $ netplayer#ship_logo.)); |
| 7965 |
// See if the the CRC is already in the filename |
| 7966 |
if (strnicmpcxx . . $ `linux/linux_fix.h:44:9`!(szcrc, file + (strlen(file) - 9), 9) == 0) { |
| 7967 |
snprintf(csum_filename, sizeof(csum_filename), "%s%s", file, ext); |
| 7968 |
} else { |
| 7969 |
snprintf(csum_filename, sizeof(csum_filename), "%s_%.8x%s", file, cf_GetfileCRCcxx . . $ cf_GetfileCRC(eb3222378d8a05e0).(NetPlayerscxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).[slot].ship_logocxx . . $ netplayer#ship_logo.), |
| 7970 |
ext); |
| 7971 |
} |
| 7972 |
} else { |
| 7973 |
strcpy(csum_filename, NetPlayerscxx . . $ NetPlayers.[slot].ship_logocxx . . $ netplayer#ship_logo.); |
| 7974 |
} |
| 7975 |
} |
| 7976 |
uint16_tcxx . . $ uint16_t# logo_len = strlen(csum_filename) + 1; |
| 7977 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(logo_len, data, &count); |
| 7978 |
memcpy(data + count, csum_filename, logo_len); |
| 7979 |
count += logo_len; |
| 7980 |
|
| 7981 |
for (int t = 0; t < 4; t++) { |
| 7982 |
// Send custom voice taunts (all 0's if none) |
| 7983 |
csum_filename[0] = '\0'; |
| 7984 |
char *filename; |
| 7985 |
|
| 7986 |
switch (t) { |
| 7987 |
case 0: |
| 7988 |
filename = NetPlayerscxx . . $ NetPlayers.[slot].voice_taunt1cxx . . $ netplayer#voice_taunt1.; |
| 7989 |
break; |
| 7990 |
case 1: |
| 7991 |
filename = NetPlayerscxx . . $ NetPlayers.[slot].voice_taunt2cxx . . $ netplayer#voice_taunt2.; |
| 7992 |
break; |
| 7993 |
case 2: |
| 7994 |
filename = NetPlayerscxx . . $ NetPlayers.[slot].voice_taunt3cxx . . $ netplayer#voice_taunt3.; |
| 7995 |
break; |
| 7996 |
case 3: |
| 7997 |
filename = NetPlayerscxx . . $ NetPlayers.[slot].voice_taunt4cxx . . $ netplayer#voice_taunt4.; |
| 7998 |
break; |
| 7999 |
} |
| 8000 |
|
| 8001 |
if (filename[0]) { |
| 8002 |
if (slot == Player_numcxx . . $ Player_num.) { |
| 8003 |
char szcrc[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 8004 |
ddio_SplitPathcxx . . $ ddio_SplitPath(b05ba7ab99603c07).(filename, path, file, ext); |
| 8005 |
snprintf(szcrc, sizeof(szcrc), "_%.8x", cf_GetfileCRCcxx . . $ cf_GetfileCRC(eb3222378d8a05e0).(filenamecxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).)); |
| 8006 |
// See if the the CRC is already in the filename |
| 8007 |
if (strnicmpcxx . . $ `linux/linux_fix.h:44:9`!(szcrc, file + (strlen(file) - 9), 9) == 0) { |
| 8008 |
snprintf(csum_filename, sizeof(csum_filename), "%s%s", file, ext); |
| 8009 |
} else { |
| 8010 |
snprintf(csum_filename, sizeof(csum_filename), "%s_%.8x%s", file, cf_GetfileCRCcxx . . $ cf_GetfileCRC(eb3222378d8a05e0).(filenamecxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).), ext); |
| 8011 |
} |
| 8012 |
} else { |
| 8013 |
strcpy(csum_filename, filename); |
| 8014 |
} |
| 8015 |
} |
| 8016 |
uint16_tcxx . . $ uint16_t# vt_len = strlen(csum_filename) + 1; |
| 8017 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(vt_len, data, &count); |
| 8018 |
memcpy(data + count, csum_filename, vt_len); |
| 8019 |
count += vt_len; |
| 8020 |
} |
| 8021 |
|
| 8022 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8023 |
|
| 8024 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 8025 |
if (whoto == -1) { |
| 8026 |
// Send to all clients |
| 8027 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 8028 |
} else { |
| 8029 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[whoto].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, true); |
| 8030 |
} |
| 8031 |
} else { |
| 8032 |
// Send to the server |
| 8033 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, true); |
| 8034 |
} |
| 8035 |
} |
| 8036 |
|
| 8037 |
void MultiDoCustomPlayerDatacxx . . $ MultiDoCustomPlayerData(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8038 |
uint16_tcxx . . $ uint16_t# playernum; // Who has data we are interested in |
| 8039 |
int count = 0; |
| 8040 |
|
| 8041 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8042 |
playernum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 8043 |
if (playernum == Player_numcxx . . $ Player_num.) |
| 8044 |
return; |
| 8045 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got custom data in MultiDoCustomPlayerData()\n"); |
| 8046 |
NetPlayerscxx . . $ NetPlayers.[playernum].custom_file_seqcxx . . $ netplayer#custom_file_seq. = NETFILE_ID_SHIP_TEXcxx . . $ `Descent3/multi.h:689:9`!; // First in the sequence of files we will request |
| 8047 |
int16_t logo_len = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 8048 |
memcpy(NetPlayerscxx . . $ NetPlayers.[playernum].ship_logocxx . . $ netplayer#ship_logo., data + count, logo_len); |
| 8049 |
count += logo_len; |
| 8050 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "%s uses custom ship logo %s\n", Players[playernum].callsign, NetPlayers[playernum].ship_logo); |
| 8051 |
|
| 8052 |
for (int t = 0; t < 4; t++) { |
| 8053 |
char *filename; |
| 8054 |
int16_t vt_len; |
| 8055 |
|
| 8056 |
switch (t) { |
| 8057 |
case 0: |
| 8058 |
filename = NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt1cxx . . $ netplayer#voice_taunt1.; |
| 8059 |
break; |
| 8060 |
case 1: |
| 8061 |
filename = NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt2cxx . . $ netplayer#voice_taunt2.; |
| 8062 |
break; |
| 8063 |
case 2: |
| 8064 |
filename = NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt3cxx . . $ netplayer#voice_taunt3.; |
| 8065 |
break; |
| 8066 |
case 3: |
| 8067 |
filename = NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt4cxx . . $ netplayer#voice_taunt4.; |
| 8068 |
break; |
| 8069 |
} |
| 8070 |
|
| 8071 |
vt_len = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 8072 |
memcpy(filename, data + count, vt_len); |
| 8073 |
count += vt_len; |
| 8074 |
} |
| 8075 |
} |
| 8076 |
|
| 8077 |
char *GetFileNameFromPlayerAndIDcxx . . $ GetFileNameFromPlayerAndID(744de07444492bc8).(int16_t playernum, int16_t id) { |
| 8078 |
static char rval[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 8079 |
|
| 8080 |
rval[0] = '\0'; |
| 8081 |
|
| 8082 |
if (playernum >= MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!) { |
| 8083 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid playernum (%d) passed to GetFileNameFromPlayerAndID()\n", playernum); |
| 8084 |
return rval; |
| 8085 |
} |
| 8086 |
if (id > NETFILE_ID_LAST_FILEcxx . . $ `Descent3/multi.h:697:9`!) { |
| 8087 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid file id (%d) passed to GetFileNameFromPlayerAndID()\n", id); |
| 8088 |
return rval; |
| 8089 |
} |
| 8090 |
switch (id) { |
| 8091 |
|
| 8092 |
case NETFILE_ID_NOFILEcxx . . $ `Descent3/multi.h:688:9`!: |
| 8093 |
break; |
| 8094 |
case NETFILE_ID_SHIP_TEXcxx . . $ `Descent3/multi.h:689:9`!: |
| 8095 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].ship_logocxx . . $ netplayer#ship_logo.[0]) |
| 8096 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(rval, Base_directory_writecxx . . $ Base_directory_write., "custom", "graphics", NetPlayerscxx . . $ NetPlayers.[playernum].ship_logocxx . . $ netplayer#ship_logo., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8097 |
break; |
| 8098 |
case NETFILE_ID_VOICE_TAUNT1cxx . . $ `Descent3/multi.h:690:9`!: |
| 8099 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt1cxx . . $ netplayer#voice_taunt1.[0]) |
| 8100 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(rval, Base_directory_writecxx . . $ Base_directory_write., "custom", "sounds", NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt1cxx . . $ netplayer#voice_taunt1., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8101 |
break; |
| 8102 |
case NETFILE_ID_VOICE_TAUNT2cxx . . $ `Descent3/multi.h:691:9`!: |
| 8103 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt2cxx . . $ netplayer#voice_taunt2.[0]) |
| 8104 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(rval, Base_directory_writecxx . . $ Base_directory_write., "custom", "sounds", NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt2cxx . . $ netplayer#voice_taunt2., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8105 |
break; |
| 8106 |
case NETFILE_ID_VOICE_TAUNT3cxx . . $ `Descent3/multi.h:692:9`!: |
| 8107 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt3cxx . . $ netplayer#voice_taunt3.[0]) |
| 8108 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(rval, Base_directory_writecxx . . $ Base_directory_write., "custom", "sounds", NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt3cxx . . $ netplayer#voice_taunt3., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8109 |
break; |
| 8110 |
case NETFILE_ID_VOICE_TAUNT4cxx . . $ `Descent3/multi.h:693:9`!: |
| 8111 |
if (NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt4cxx . . $ netplayer#voice_taunt4.[0]) |
| 8112 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(rval, Base_directory_writecxx . . $ Base_directory_write., "custom", "sounds", NetPlayerscxx . . $ NetPlayers.[playernum].voice_taunt4cxx . . $ netplayer#voice_taunt4., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8113 |
break; |
| 8114 |
default: |
| 8115 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Unknown id (%d) passed to GetFileNameFromPlayerAndID()\n", id); |
| 8116 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 8117 |
break; |
| 8118 |
} |
| 8119 |
if (*rval) { |
| 8120 |
CFILEcxx . . $ CFILE# *cfp; |
| 8121 |
cfp = cfopencxx . . $ cfopen(7c7b94e455f1ae56).(rvalcxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d)., "rb"); |
| 8122 |
if (!cfp) { |
| 8123 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Multiplayer file xfer File does not exist, not using file %d for player %d!\n", id, playernum); |
| 8124 |
// rval[0] = '\0'; |
| 8125 |
} else if (32768 < cfilelengthcxx . . $ cfilelength(e4541f75b25d0ae5).(cfp)) { |
| 8126 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Multiplayer file xfer File to long, not using file %d for player %d!\n", id, playernum); |
| 8127 |
rval[0] = '\0'; |
| 8128 |
} |
| 8129 |
if (cfp) |
| 8130 |
cfclosecxx . . $ cfclose(3639e799710acb68).(cfp); |
| 8131 |
} |
| 8132 |
|
| 8133 |
return rval; |
| 8134 |
} |
| 8135 |
|
| 8136 |
// Tells the clients to ghost or unghost an object |
| 8137 |
void MultiSendGhostObjectcxx . . $ MultiSendGhostObject(674fac047436fc5b).(objectcxx . . $ object# *obj, bool ghost) { |
| 8138 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(obj); |
| 8139 |
|
| 8140 |
int count = 0; |
| 8141 |
uint16_tcxx . . $ uint16_t# objnum; |
| 8142 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8143 |
int size_offset; |
| 8144 |
|
| 8145 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_GHOST_OBJECTcxx . . $ `Descent3/multi.h:603:9`!, data, &count, 1); |
| 8146 |
|
| 8147 |
objnum = obj - Objectscxx . . $ Objects.; |
| 8148 |
|
| 8149 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(objnum, data, &count); |
| 8150 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).((ghost) ? 1 : 0, data, &count); |
| 8151 |
|
| 8152 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8153 |
|
| 8154 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 8155 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, false); |
| 8156 |
} |
| 8157 |
|
| 8158 |
void MultiDoGhostObjectcxx . . $ MultiDoGhostObject(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8159 |
int count = 0; |
| 8160 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8161 |
|
| 8162 |
uint16_tcxx . . $ uint16_t# server_objnum, objnum; |
| 8163 |
bool ghost; |
| 8164 |
|
| 8165 |
server_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 8166 |
ghost = (MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count)) ? true : false; |
| 8167 |
|
| 8168 |
objnum = Server_object_listcxx . . $ Server_object_list.[server_objnum]; |
| 8169 |
|
| 8170 |
if (objnum == 65535) { |
| 8171 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason, bad object number |
| 8172 |
return; |
| 8173 |
} |
| 8174 |
|
| 8175 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(objnum != -1); |
| 8176 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Objects[objnum].type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 8177 |
|
| 8178 |
if (ghost) { |
| 8179 |
ObjGhostObjectcxx . . $ ObjGhostObject(d4f767463ce0a6b3).(objnum); |
| 8180 |
} else { |
| 8181 |
ObjUnGhostObjectcxx . . $ ObjUnGhostObject(d4f767463ce0a6b3).(objnum); |
| 8182 |
} |
| 8183 |
} |
| 8184 |
|
| 8185 |
// Sends a ping request to a player |
| 8186 |
void MultiSendPingcxx . . $ MultiSendPing(d4f767463ce0a6b3).(int slot) { |
| 8187 |
int count = 0; |
| 8188 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8189 |
int size_offset; |
| 8190 |
|
| 8191 |
if (slot == Player_numcxx . . $ Player_num.) |
| 8192 |
return; |
| 8193 |
NetPlayerscxx . . $ NetPlayers.[slot].last_ping_timecxx . . $ netplayer#last_ping_time. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 8194 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYER_PINGcxx . . $ `Descent3/multi.h:604:9`!, data, &count); |
| 8195 |
|
| 8196 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 8197 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(NetPlayerscxx . . $ NetPlayers.[slot].last_ping_timecxx . . $ netplayer#last_ping_time., data, &count); |
| 8198 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8199 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&NetPlayerscxx . . $ NetPlayers.[slot].addrcxx . . $ netplayer#addr., data, count, 0); |
| 8200 |
} |
| 8201 |
|
| 8202 |
void MultiDoPingcxx . . $ MultiDoPing(b4ed6bda213be74).(uint8_tcxx . . $ uint8_t# *data, network_addresscxx . . $ network_address# *addr) { |
| 8203 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8204 |
int outcount = 0; |
| 8205 |
int count = 0; |
| 8206 |
int size_offset; |
| 8207 |
|
| 8208 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8209 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8210 |
float pingtime = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 8211 |
|
| 8212 |
// Now send a response |
| 8213 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYER_PONGcxx . . $ `Descent3/multi.h:605:9`!, outdata, &outcount); |
| 8214 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., outdata, &outcount); |
| 8215 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(pingtime, outdata, &outcount); |
| 8216 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(outcount, outdata, size_offset); |
| 8217 |
|
| 8218 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(addr, outdata, outcount, 0); |
| 8219 |
} |
| 8220 |
|
| 8221 |
void MultiDoPongcxx . . $ MultiDoPong(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8222 |
uint8_tcxx . . $ uint8_t# outdata[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8223 |
int outcount = 0; |
| 8224 |
int count = 0; |
| 8225 |
int size_offset; |
| 8226 |
|
| 8227 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8228 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8229 |
float pingtime = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 8230 |
NetPlayerscxx . . $ NetPlayers.[slot].ping_timecxx . . $ netplayer#ping_time. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - pingtime; |
| 8231 |
|
| 8232 |
// If we are the server and this is a client server game, send the lag info to other clients |
| 8233 |
if ((Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) && (!(Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_PEER_PEERcxx . . $ `Descent3/multi_external.h:230:9`!))) { |
| 8234 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYER_LAG_INFOcxx . . $ `Descent3/multi.h:606:9`!, outdata, &outcount); |
| 8235 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, outdata, &outcount); |
| 8236 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(NetPlayerscxx . . $ NetPlayers.[slot].ping_timecxx . . $ netplayer#ping_time., outdata, &outcount); |
| 8237 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(outcount, outdata, size_offset); |
| 8238 |
MultiSendToAllExceptcxx . . $ MultiSendToAllExcept(34ee600be5240935).(Player_numcxx . . $ Player_num., outdata, outcount, 0); |
| 8239 |
} |
| 8240 |
} |
| 8241 |
|
| 8242 |
void MultiDoLagInfocxx . . $ MultiDoLagInfo(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8243 |
int count = 0; |
| 8244 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8245 |
uint8_tcxx . . $ uint8_t# slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8246 |
NetPlayerscxx . . $ NetPlayers.[slot].ping_timecxx . . $ netplayer#ping_time. = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 8247 |
} |
| 8248 |
|
| 8249 |
// the server is telling us to play an audio taunt |
| 8250 |
void MultiDoPlayTauntcxx . . $ MultiDoPlayTaunt(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8251 |
int count = 0; |
| 8252 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8253 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8254 |
int index = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8255 |
if (!Dedicated_servercxx . . $ Dedicated_server.) |
| 8256 |
taunt_PlayPlayerTauntcxx . . $ taunt_PlayPlayerTaunt(cf9ef193275fa6d8).(pnum, index); |
| 8257 |
} |
| 8258 |
|
| 8259 |
// tell the clients to play an audio taunt |
| 8260 |
void MultiSendPlayTauntcxx . . $ MultiSendPlayTaunt(3e454b8ccf442868).(int pnum, int index) { |
| 8261 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 8262 |
return; |
| 8263 |
|
| 8264 |
int count = 0; |
| 8265 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8266 |
int size_offset; |
| 8267 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_SERVER_PLAY_TAUNTcxx . . $ `Descent3/multi.h:627:9`!, data, &count); |
| 8268 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(pnum, data, &count); |
| 8269 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(index, data, &count); |
| 8270 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8271 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, false); |
| 8272 |
MultiDoPlayTauntcxx . . $ MultiDoPlayTaunt(f25546b61a629de7).(data); |
| 8273 |
} |
| 8274 |
|
| 8275 |
// process a request by a client to play an audio taunt |
| 8276 |
void MultiDoRequestPlayTauntcxx . . $ MultiDoRequestPlayTaunt(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8277 |
int count = 0; |
| 8278 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8279 |
|
| 8280 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8281 |
int index = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8282 |
|
| 8283 |
MultiSendPlayTauntcxx . . $ MultiSendPlayTaunt(3e454b8ccf442868).(pnum, index); |
| 8284 |
} |
| 8285 |
|
| 8286 |
// Client is asking the server to play an audio taunt |
| 8287 |
void MultiSendRequestPlayTauntcxx . . $ MultiSendRequestPlayTaunt(d4f767463ce0a6b3).(int index) { |
| 8288 |
|
| 8289 |
if (!(Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!)) |
| 8290 |
return; |
| 8291 |
|
| 8292 |
if (index < 0 || index > 3) |
| 8293 |
return; |
| 8294 |
|
| 8295 |
if (!taunt_AreEnabledcxx . . $ taunt_AreEnabled(c9857a73d68e59ba).()) |
| 8296 |
return; |
| 8297 |
|
| 8298 |
// make sure an audio file exists there |
| 8299 |
char audio_file[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`!]; |
| 8300 |
|
| 8301 |
switch (index) { |
| 8302 |
case 0: |
| 8303 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(audio_file, LocalCustomSoundsDircxx . . $ LocalCustomSoundsDir., NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].voice_taunt1cxx . . $ netplayer#voice_taunt1., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8304 |
break; |
| 8305 |
case 1: |
| 8306 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(audio_file, LocalCustomSoundsDircxx . . $ LocalCustomSoundsDir., NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].voice_taunt2cxx . . $ netplayer#voice_taunt2., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8307 |
break; |
| 8308 |
case 2: |
| 8309 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(audio_file, LocalCustomSoundsDircxx . . $ LocalCustomSoundsDir., NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].voice_taunt3cxx . . $ netplayer#voice_taunt3., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8310 |
break; |
| 8311 |
case 3: |
| 8312 |
ddio_MakePathcxx . . $ ddio_MakePath(9ad4b0815420a85).(audio_file, LocalCustomSoundsDircxx . . $ LocalCustomSoundsDir., NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].voice_taunt4cxx . . $ netplayer#voice_taunt4., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 8313 |
break; |
| 8314 |
} |
| 8315 |
|
| 8316 |
if (!cfexistcxx . . $ cfexist(293b0826c8d9cb54).(audio_filecxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d).)) { |
| 8317 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Ignoring request to play audio taunt...it does not exist\n"); |
| 8318 |
return; |
| 8319 |
} |
| 8320 |
|
| 8321 |
float t = Gametimecxx . . $ Gametime.; |
| 8322 |
if ((t - Time_last_taunt_requestcxx . . $ Time_last_taunt_request.) < taunt_DelayTimecxx . . $ taunt_DelayTime(9b8c9e39889c762c).()) { |
| 8323 |
// too soon since last request |
| 8324 |
return; |
| 8325 |
} |
| 8326 |
Time_last_taunt_requestcxx . . $ Time_last_taunt_request. = t; |
| 8327 |
|
| 8328 |
int count = 0; |
| 8329 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8330 |
int size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_CLIENT_PLAY_TAUNTcxx . . $ `Descent3/multi.h:626:9`!, data, &count); |
| 8331 |
|
| 8332 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 8333 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(index, data, &count); |
| 8334 |
|
| 8335 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8336 |
|
| 8337 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 8338 |
MultiDoRequestPlayTauntcxx . . $ MultiDoRequestPlayTaunt(f25546b61a629de7).(data); |
| 8339 |
} else { |
| 8340 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count); |
| 8341 |
} |
| 8342 |
} |
| 8343 |
|
| 8344 |
// the server is telling us that about a player's message-type state (is [not] typing a message) |
| 8345 |
void MultiDoTypeIconcxx . . $ MultiDoTypeIcon(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8346 |
int count = 0; |
| 8347 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8348 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8349 |
bool typing = (MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count)) ? true : false; |
| 8350 |
|
| 8351 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(pnum >= 0 && pnum < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!); |
| 8352 |
|
| 8353 |
uint32_tcxx . . $ uint32_t# bit = 0x01; |
| 8354 |
bit = bit << pnum; |
| 8355 |
|
| 8356 |
if (typing) { |
| 8357 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "%s is typing\n", Players[pnum].callsign); |
| 8358 |
Players_typingcxx . . $ Players_typing. |= bit; |
| 8359 |
} else { |
| 8360 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "%s is done typing\n", Players[pnum].callsign); |
| 8361 |
Players_typingcxx . . $ Players_typing. &= ~bit; |
| 8362 |
} |
| 8363 |
} |
| 8364 |
|
| 8365 |
// tell the clients that a player is [not] typing a message |
| 8366 |
void MultiSendTypeIconcxx . . $ MultiSendTypeIcon(918ebd27a9ddbad3).(int pnum, bool typing_message) { |
| 8367 |
int count = 0; |
| 8368 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8369 |
int size_offset; |
| 8370 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_SEND_TYPE_ICONcxx . . $ `Descent3/multi.h:630:9`!, data, &count); |
| 8371 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(pnum, data, &count); |
| 8372 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).((typing_message) ? 1 : 0, data, &count); |
| 8373 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8374 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, false); |
| 8375 |
MultiDoTypeIconcxx . . $ MultiDoTypeIcon(f25546b61a629de7).(data); |
| 8376 |
} |
| 8377 |
|
| 8378 |
// process a request by a client that he is [not] typing a message |
| 8379 |
void MultiDoRequestTypeIconcxx . . $ MultiDoRequestTypeIcon(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8380 |
int count = 0; |
| 8381 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8382 |
|
| 8383 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8384 |
bool typing = (MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count)) ? true : false; |
| 8385 |
|
| 8386 |
MultiSendTypeIconcxx . . $ MultiSendTypeIcon(918ebd27a9ddbad3).(pnum, typing); |
| 8387 |
} |
| 8388 |
|
| 8389 |
// Client is telling the server that he is [not] typing a hud message |
| 8390 |
void MultiSendRequestTypeIconcxx . . $ MultiSendRequestTypeIcon(b45ddcbc8423892c).(bool typing_message) { |
| 8391 |
uint32_tcxx . . $ uint32_t# bit = (0x01 << Player_numcxx . . $ Player_num.); |
| 8392 |
|
| 8393 |
if (typing_message && (bit & Players_typingcxx . . $ Players_typing.)) |
| 8394 |
return; // already typing no need to request |
| 8395 |
|
| 8396 |
int count = 0; |
| 8397 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8398 |
int size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_TYPE_ICONcxx . . $ `Descent3/multi.h:629:9`!, data, &count); |
| 8399 |
|
| 8400 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 8401 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).((typing_message) ? 1 : 0, data, &count); |
| 8402 |
|
| 8403 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8404 |
|
| 8405 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 8406 |
MultiDoRequestTypeIconcxx . . $ MultiDoRequestTypeIcon(f25546b61a629de7).(data); |
| 8407 |
} else { |
| 8408 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 8409 |
} |
| 8410 |
} |
| 8411 |
|
| 8412 |
void MultiSendAiWeaponFlagscxx . . $ MultiSendAiWeaponFlags(a7790401ac9fc765).(objectcxx . . $ object# *obj, int flags, int wb_index) { |
| 8413 |
int count = 0; |
| 8414 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8415 |
int size_offset; |
| 8416 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_AIWEAP_FLAGScxx . . $ `Descent3/multi.h:614:9`!, data, &count); |
| 8417 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(OBJNUMcxx . . $ `Descent3/object.h:700:9`!(obj), data, &count); |
| 8418 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(flags, data, &count); |
| 8419 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(wb_index, data, &count); |
| 8420 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8421 |
MultiSendToAllExceptcxx . . $ MultiSendToAllExcept(34ee600be5240935).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!); |
| 8422 |
} |
| 8423 |
|
| 8424 |
void MultiDoAiWeaponFlagscxx . . $ MultiDoAiWeaponFlags(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8425 |
int count = 0; |
| 8426 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8427 |
|
| 8428 |
int flags; |
| 8429 |
int wb_index; |
| 8430 |
int16_t obj_num = Server_object_listcxx . . $ Server_object_list.[MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count)]; |
| 8431 |
flags = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 8432 |
wb_index = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8433 |
if (obj_num == 65535) { |
| 8434 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client/Server object lists don't match! (Server num %d)\n", obj_num); |
| 8435 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 8436 |
return; |
| 8437 |
} |
| 8438 |
|
| 8439 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[obj_num].ai_info); |
| 8440 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[obj_num].type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 8441 |
|
| 8442 |
Objectscxx . . $ Objects.[obj_num].ai_infocxx . . $ object#ai_info.->last_special_wb_firingcxx . . $ ai_frame#last_special_wb_firing. = wb_index; |
| 8443 |
Objectscxx . . $ Objects.[obj_num].weapon_fire_flagscxx . . $ object#weapon_fire_flags. = flags; |
| 8444 |
if (Demo_flagscxx . . $ Demo_flags. == DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`!) { |
| 8445 |
DemoWriteObjWeapFireFlagChangedcxx . . $ DemoWriteObjWeapFireFlagChanged(68e3ae50fe6578a9).(obj_num); |
| 8446 |
} |
| 8447 |
} |
| 8448 |
|
| 8449 |
void MultiSendAttachcxx . . $ MultiSendAttach(5e1f903503988afd).(objectcxx . . $ object# *parent, char parent_ap, objectcxx . . $ object# *child, char child_ap, bool f_aligned) { |
| 8450 |
int count = 0; |
| 8451 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8452 |
int size_offset; |
| 8453 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ATTACH_OBJcxx . . $ `Descent3/multi.h:612:9`!, data, &count); |
| 8454 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(OBJNUMcxx . . $ `Descent3/object.h:700:9`!(parent), data, &count); |
| 8455 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(parent_ap, data, &count); |
| 8456 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(OBJNUMcxx . . $ `Descent3/object.h:700:9`!(child), data, &count); |
| 8457 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(child_ap, data, &count); |
| 8458 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(f_aligned ? 1 : 0, data, &count); |
| 8459 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8460 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_WORLDcxx . . $ `Descent3/multi_external.h:160:9`!, false); |
| 8461 |
} |
| 8462 |
|
| 8463 |
void MultiDoAttachcxx . . $ MultiDoAttach(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8464 |
|
| 8465 |
objectcxx . . $ object# *parent; |
| 8466 |
char parent_ap; |
| 8467 |
objectcxx . . $ object# *child; |
| 8468 |
char child_ap; |
| 8469 |
bool f_aligned; |
| 8470 |
|
| 8471 |
int count = 0; |
| 8472 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8473 |
|
| 8474 |
uint16_tcxx . . $ uint16_t# parent_num = Server_object_listcxx . . $ Server_object_list.[MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count)]; |
| 8475 |
parent_ap = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8476 |
parent = &Objectscxx . . $ Objects.[parent_num]; |
| 8477 |
uint16_tcxx . . $ uint16_t# child_num = Server_object_listcxx . . $ Server_object_list.[MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count)]; |
| 8478 |
child_ap = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8479 |
child = &Objectscxx . . $ Objects.[child_num]; |
| 8480 |
f_aligned = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count) ? true : false; |
| 8481 |
|
| 8482 |
if (parent_num == 65535) { |
| 8483 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client/Server object lists don't match! (Server num %d)\n", parent_num); |
| 8484 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 8485 |
return; |
| 8486 |
} |
| 8487 |
if (child_num == 65535) { |
| 8488 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client/Server object lists don't match! (Server num %d)\n", child_num); |
| 8489 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 8490 |
return; |
| 8491 |
} |
| 8492 |
|
| 8493 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(child >= Objects && parent >= Objects); |
| 8494 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(child->type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`! && parent->type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 8495 |
|
| 8496 |
AttachObjectcxx . . $ AttachObject(f6b18a350068acc8).(parent, parent_ap, child, child_ap, f_aligned); |
| 8497 |
} |
| 8498 |
|
| 8499 |
void MultiSendAttachRadcxx . . $ MultiSendAttachRad(dd3c3fb04585c0c5).(objectcxx . . $ object# *parent, char parent_ap, objectcxx . . $ object# *child, float rad) { |
| 8500 |
int count = 0; |
| 8501 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8502 |
int size_offset; |
| 8503 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ATTACH_RAD_OBJcxx . . $ `Descent3/multi.h:615:9`!, data, &count); |
| 8504 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(OBJNUMcxx . . $ `Descent3/object.h:700:9`!(parent), data, &count); |
| 8505 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(parent_ap, data, &count); |
| 8506 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(OBJNUMcxx . . $ `Descent3/object.h:700:9`!(child), data, &count); |
| 8507 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(rad, data, &count); |
| 8508 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8509 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_WORLDcxx . . $ `Descent3/multi_external.h:160:9`!, false); |
| 8510 |
} |
| 8511 |
|
| 8512 |
void MultiDoAttachRadcxx . . $ MultiDoAttachRad(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8513 |
|
| 8514 |
objectcxx . . $ object# *parent; |
| 8515 |
char parent_ap; |
| 8516 |
objectcxx . . $ object# *child; |
| 8517 |
float rad; |
| 8518 |
|
| 8519 |
int count = 0; |
| 8520 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8521 |
|
| 8522 |
uint16_tcxx . . $ uint16_t# parent_num = Server_object_listcxx . . $ Server_object_list.[MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count)]; |
| 8523 |
parent_ap = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8524 |
parent = &Objectscxx . . $ Objects.[parent_num]; |
| 8525 |
uint16_tcxx . . $ uint16_t# child_num = Server_object_listcxx . . $ Server_object_list.[MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count)]; |
| 8526 |
rad = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 8527 |
child = &Objectscxx . . $ Objects.[child_num]; |
| 8528 |
|
| 8529 |
if (parent_num == 65535) { |
| 8530 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client/Server object lists don't match! (Server num %d)\n", parent_num); |
| 8531 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 8532 |
return; |
| 8533 |
} |
| 8534 |
if (child_num == 65535) { |
| 8535 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client/Server object lists don't match! (Server num %d)\n", child_num); |
| 8536 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 8537 |
return; |
| 8538 |
} |
| 8539 |
|
| 8540 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(child >= Objects && parent >= Objects); |
| 8541 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(child->type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`! && parent->type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!); |
| 8542 |
|
| 8543 |
AttachObjectcxx . . $ AttachObject(45561ecb6c1b979f).(parent, parent_ap, child, rad); |
| 8544 |
} |
| 8545 |
|
| 8546 |
void MultiSendUnattachcxx . . $ MultiSendUnattach(419c470199a90a97).(objectcxx . . $ object# *child) { |
| 8547 |
int count = 0; |
| 8548 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8549 |
int size_offset; |
| 8550 |
|
| 8551 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(Objects[OBJNUMcxx . . $ `Descent3/object.h:700:9`!(child)].flags & OF_CLIENT_KNOWScxx . . $ `Descent3/object_external.h:289:9`!); |
| 8552 |
|
| 8553 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_UNATTACH_OBJcxx . . $ `Descent3/multi.h:613:9`!, data, &count); |
| 8554 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(OBJNUMcxx . . $ `Descent3/object.h:700:9`!(child), data, &count); |
| 8555 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8556 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, false); |
| 8557 |
} |
| 8558 |
|
| 8559 |
void MultiDoUnattachcxx . . $ MultiDoUnattach(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8560 |
objectcxx . . $ object# *child; |
| 8561 |
|
| 8562 |
int count = 0; |
| 8563 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8564 |
int server_objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 8565 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(server_objnum >= 0 && server_objnum < MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!); |
| 8566 |
uint16_tcxx . . $ uint16_t# child_num = Server_object_listcxx . . $ Server_object_list.[server_objnum]; |
| 8567 |
child = &Objectscxx . . $ Objects.[child_num]; |
| 8568 |
if (child_num == 65535) { |
| 8569 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client/Server object lists don't match! (Server num %d)\n", child_num); |
| 8570 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 8571 |
return; |
| 8572 |
} |
| 8573 |
|
| 8574 |
UnattachFromParentcxx . . $ UnattachFromParent(39516aeee13ca5ab).(child); |
| 8575 |
} |
| 8576 |
|
| 8577 |
void MultiSendThiefStealcxx . . $ MultiSendThiefSteal(3e454b8ccf442868).(int player, int item) { |
| 8578 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 8579 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(player >= 0 && player < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!); |
| 8580 |
|
| 8581 |
int count = 0; |
| 8582 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8583 |
int size_offset; |
| 8584 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_THIEF_STEALcxx . . $ `Descent3/multi.h:638:9`!, data, &count); |
| 8585 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(item, data, &count); |
| 8586 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(player, data, &count); |
| 8587 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8588 |
|
| 8589 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, false); |
| 8590 |
} |
| 8591 |
|
| 8592 |
void MultiDoThiefStealcxx . . $ MultiDoThiefSteal(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8593 |
int count = 0; |
| 8594 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8595 |
int item = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 8596 |
int player = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 8597 |
ThiefStealItemcxx . . $ ThiefStealItem(3e454b8ccf442868).(Objectscxx . . $ Objects.[Playerscxx . . $ Players.[player].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle., item); |
| 8598 |
} |
| 8599 |
|
| 8600 |
// Sets whether or not we want the logos to be displayed on ships |
| 8601 |
void MultiSetLogoStatecxx . . $ MultiSetLogoState(b45ddcbc8423892c).(bool state) { |
| 8602 |
Multi_logo_statecxx . . $ Multi_logo_state. = state; |
| 8603 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Setting multi_logo_state to %d\n", state); |
| 8604 |
} |
| 8605 |
|
| 8606 |
void MultiDoPermissionToFirecxx . . $ MultiDoPermissionToFire(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8607 |
int count = 0; |
| 8608 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8609 |
|
| 8610 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8611 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8612 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].fire_maskcxx . . $ player_fire_packet#fire_mask. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8613 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].damage_scalarcxx . . $ player_fire_packet#damage_scalar. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8614 |
|
| 8615 |
// Get positional info |
| 8616 |
vectorcxx . . $ vector# pos; |
| 8617 |
matrixcxx . . $ matrix# orient; |
| 8618 |
|
| 8619 |
// memcpy (&pos,&data[count],sizeof(vector)); |
| 8620 |
// count+=sizeof(vector); |
| 8621 |
pos =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 8622 |
|
| 8623 |
// Get orientation |
| 8624 |
uint16_tcxx . . $ uint16_t# p = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 8625 |
uint16_tcxx . . $ uint16_t# h = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 8626 |
uint16_tcxx . . $ uint16_t# b = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 8627 |
|
| 8628 |
vm_AnglesToMatrixcxx . . $ vm_AnglesToMatrix(654fa9e3c9c3be99).(&orient, p, h, b); |
| 8629 |
|
| 8630 |
// Get room and terrain flag |
| 8631 |
uint16_tcxx . . $ uint16_t# short_roomnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 8632 |
uint8_tcxx . . $ uint8_t# outside = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8633 |
int roomnum; |
| 8634 |
|
| 8635 |
if (outside) |
| 8636 |
roomnum = MAKE_ROOMNUMcxx . . $ `lib/object_external_struct.h:124:9`!(short_roomnum); |
| 8637 |
else |
| 8638 |
roomnum = short_roomnum; |
| 8639 |
|
| 8640 |
// Strip out quad data |
| 8641 |
int wb_index = Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index.; |
| 8642 |
int quaded = wb_index & MPFF_QUADEDcxx . . $ `Descent3/multi.cpp:3329:9`!; |
| 8643 |
wb_index &= ~MPFF_QUADEDcxx . . $ `Descent3/multi.cpp:3329:9`!; |
| 8644 |
|
| 8645 |
// Fire! |
| 8646 |
float scalar = (float)Player_fire_packetcxx . . $ Player_fire_packet.[pnum].damage_scalarcxx . . $ player_fire_packet#damage_scalar. / 64.0; |
| 8647 |
int ship_index = Playerscxx . . $ Players.[pnum].ship_indexcxx . . $ player#ship_index.; |
| 8648 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.]; |
| 8649 |
|
| 8650 |
int save_mask = obj->dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].cur_firing_maskcxx . . $ dynamic_wb_info#cur_firing_mask.; |
| 8651 |
int save_flags = obj->dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].flagscxx . . $ dynamic_wb_info#flags.; |
| 8652 |
int save_roomnum = obj->roomnumcxx . . $ object#roomnum.; |
| 8653 |
matrixcxx . . $ matrix# save_orient = obj->orientcxx . . $ object#orient.; |
| 8654 |
vectorcxx . . $ vector# save_pos = obj->poscxx . . $ object#pos.; |
| 8655 |
|
| 8656 |
obj->dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].cur_firing_maskcxx . . $ dynamic_wb_info#cur_firing_mask. = Player_fire_packetcxx . . $ Player_fire_packet.[pnum].fire_maskcxx . . $ player_fire_packet#fire_mask.; |
| 8657 |
|
| 8658 |
if (quaded) |
| 8659 |
obj->dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].flagscxx . . $ dynamic_wb_info#flags. |= DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!; |
| 8660 |
else |
| 8661 |
obj->dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].flagscxx . . $ dynamic_wb_info#flags. &= ~DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!; |
| 8662 |
|
| 8663 |
// Move the player into the temp position just for this firing |
| 8664 |
ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &pos, roomnum, &orient, false); |
| 8665 |
|
| 8666 |
WBFireBatterycxx . . $ WBFireBattery(721350389efbb479).(obj, &Shipscxx . . $ Ships.[ship_index].static_wbcxx . . $ ship#static_wb.[wb_index], 0, wb_index, scalar); |
| 8667 |
|
| 8668 |
obj->dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].cur_firing_maskcxx . . $ dynamic_wb_info#cur_firing_mask. = save_mask; |
| 8669 |
obj->dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].flagscxx . . $ dynamic_wb_info#flags. = save_flags; |
| 8670 |
|
| 8671 |
ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &save_pos, save_roomnum, &save_orient, false); |
| 8672 |
|
| 8673 |
// Play cutoff sound if there is one |
| 8674 |
int cutoff_sound = Shipscxx . . $ Ships.[ship_index].firing_release_soundcxx . . $ ship#firing_release_sound.[wb_index]; |
| 8675 |
if (cutoff_sound != -1) |
| 8676 |
Sound_systemcxx . . $ Sound_system..Play3dSoundcxx . . $ hlsSystem#Play3dSound(7fd84bfdbf757f76).(cutoff_sound, &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.]); |
| 8677 |
} |
| 8678 |
|
| 8679 |
void MultiSendPermissionToFirecxx . . $ MultiSendPermissionToFire(d4f767463ce0a6b3).(int pnum) { |
| 8680 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 8681 |
|
| 8682 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.]; |
| 8683 |
|
| 8684 |
int count = 0; |
| 8685 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8686 |
int size_offset; |
| 8687 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PERMISSION_TO_FIREcxx . . $ `Descent3/multi.h:624:9`!, data, &count); |
| 8688 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(pnum, data, &count); |
| 8689 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index., data, &count); |
| 8690 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(Player_fire_packetcxx . . $ Player_fire_packet.[pnum].fire_maskcxx . . $ player_fire_packet#fire_mask., data, &count); |
| 8691 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(Player_fire_packetcxx . . $ Player_fire_packet.[pnum].damage_scalarcxx . . $ player_fire_packet#damage_scalar., data, &count); |
| 8692 |
|
| 8693 |
// Do position |
| 8694 |
// memcpy (&data[count],&obj->pos,sizeof(vector)); |
| 8695 |
// count+=sizeof(vector); |
| 8696 |
MultiAddVectorcxx . . $ MultiAddVector(f5e3e9791ffe6d9f).(obj->poscxx . . $ object#pos., data, &count); |
| 8697 |
|
| 8698 |
// Do orientation |
| 8699 |
angveccxx . . $ angvec# angs; |
| 8700 |
vm_ExtractAnglesFromMatrixcxx . . $ vm_ExtractAnglesFromMatrix(5f9a6d6f613ae256).(&angs, &obj->orientcxx . . $ object#orient.); |
| 8701 |
|
| 8702 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.pcxx . . $ angvec#p., data, &count); |
| 8703 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.hcxx . . $ angvec#h., data, &count); |
| 8704 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.bcxx . . $ angvec#b., data, &count); |
| 8705 |
|
| 8706 |
// Do roomnumber and terrain flag |
| 8707 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(obj->roomnum), data, &count); |
| 8708 |
|
| 8709 |
// Fill flags |
| 8710 |
if (OBJECT_OUTSIDEcxx . . $ `lib/object_external_struct.h:130:9`!(obj)) |
| 8711 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(1, data, &count); |
| 8712 |
else |
| 8713 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(0, data, &count); |
| 8714 |
|
| 8715 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8716 |
|
| 8717 |
#ifdef RELIABLE_SECONDARIES |
| 8718 |
if ((Player_fire_packet[pnum].wb_index >= SECONDARY_INDEX) && (Player_fire_packet[pnum].wb_index != FLARE_INDEX)) { |
| 8719 |
// send reliably |
| 8720 |
// mprintf(0,"PCS: SENDING RELIABLE FIRE FOR %d\n",pnum); |
| 8721 |
MultiSendReliablyToAllExcept(Player_num, data, count, NETSEQ_PLAYING, true); |
| 8722 |
} else |
| 8723 |
#endif |
| 8724 |
{ |
| 8725 |
MultiSendToAllExceptcxx . . $ MultiSendToAllExcept(34ee600be5240935).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 8726 |
} |
| 8727 |
MultiDoPermissionToFirecxx . . $ MultiDoPermissionToFire(f25546b61a629de7).(data); |
| 8728 |
} |
| 8729 |
|
| 8730 |
// A client is asking for permission to fire |
| 8731 |
void MultiDoRequestToFirecxx . . $ MultiDoRequestToFire(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8732 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 8733 |
|
| 8734 |
int count = 0; |
| 8735 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8736 |
|
| 8737 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8738 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index. = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 8739 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].fire_maskcxx . . $ player_fire_packet#fire_mask. = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 8740 |
Player_fire_packetcxx . . $ Player_fire_packet.[pnum].damage_scalarcxx . . $ player_fire_packet#damage_scalar. = MultiGetUbytecxx . . $ MultiGetUbyte(96e36f15bd3e0281).(data, &count); |
| 8741 |
|
| 8742 |
// Check to see if this player is firing a weapon he doesn't have |
| 8743 |
playercxx . . $ player# *playp = &Playerscxx . . $ Players.[pnum]; |
| 8744 |
if ((playp->weapon_flagscxx . . $ player#weapon_flags. & (1 << Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index.))) { |
| 8745 |
if (MultiEnoughAmmoToFirecxx . . $ MultiEnoughAmmoToFire(cf9ef193275fa6d8).(pnum, Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index.)) { |
| 8746 |
MultiSendPermissionToFirecxx . . $ MultiSendPermissionToFire(d4f767463ce0a6b3).(pnum); |
| 8747 |
// Take off ammo |
| 8748 |
MultiSubtractAmmoToFirecxx . . $ MultiSubtractAmmoToFire(3e454b8ccf442868).(pnum, Player_fire_packetcxx . . $ Player_fire_packet.[pnum].wb_indexcxx . . $ player_fire_packet#wb_index.); |
| 8749 |
} |
| 8750 |
} |
| 8751 |
} |
| 8752 |
|
| 8753 |
// We're asking the servers permission to fire |
| 8754 |
void MultiSendRequestToFirecxx . . $ MultiSendRequestToFire(c2f439e40e2f19ed).(int wb_index, int fire_mask, float scalar) { |
| 8755 |
// Send quaded info if needed |
| 8756 |
uint8_tcxx . . $ uint8_t# index_to_send = wb_index; |
| 8757 |
|
| 8758 |
if (Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.].dynamic_wbcxx . . $ object#dynamic_wb.[wb_index].flagscxx . . $ dynamic_wb_info#flags. & DWBF_QUADcxx . . $ `lib/robotfirestruct_external.h:47:9`!) |
| 8759 |
index_to_send |= MPFF_QUADEDcxx . . $ `Descent3/multi.cpp:3329:9`!; |
| 8760 |
|
| 8761 |
uint8_tcxx . . $ uint8_t# damage_scalar = (scalar * 64.0); |
| 8762 |
|
| 8763 |
int count = 0; |
| 8764 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8765 |
int size_offset; |
| 8766 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_TO_FIREcxx . . $ `Descent3/multi.h:623:9`!, data, &count); |
| 8767 |
|
| 8768 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 8769 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(index_to_send, data, &count); |
| 8770 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(fire_mask, data, &count); |
| 8771 |
MultiAddUbytecxx . . $ MultiAddUbyte(3bbe8835367eaa4e).(damage_scalar, data, &count); |
| 8772 |
|
| 8773 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8774 |
|
| 8775 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 8776 |
MultiDoRequestToFirecxx . . $ MultiDoRequestToFire(f25546b61a629de7).(data); |
| 8777 |
} else { |
| 8778 |
#ifdef RELIABLE_SECONDARIES |
| 8779 |
// should we send reliably? (secondaries) |
| 8780 |
if ((wb_index >= SECONDARY_INDEX) && (wb_index != FLARE_INDEX)) { |
| 8781 |
// send reliably |
| 8782 |
// mprintf(0,"PCS: Sending fire request reliably\n"); |
| 8783 |
nw_SendReliable(NetPlayers[Player_num].reliable_socket, data, count, true); |
| 8784 |
} else |
| 8785 |
#endif |
| 8786 |
{ |
| 8787 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&Netgamecxx . . $ Netgame..server_addresscxx . . $ netgame_info#server_address., data, count, 0); |
| 8788 |
} |
| 8789 |
} |
| 8790 |
} |
| 8791 |
|
| 8792 |
// Server is processing a request for a marker |
| 8793 |
void MultiDoRequestMarkercxx . . $ MultiDoRequestMarker(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8794 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 8795 |
|
| 8796 |
int count = 0; |
| 8797 |
char message[100]; |
| 8798 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8799 |
|
| 8800 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8801 |
uint8_tcxx . . $ uint8_t# len = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8802 |
memcpy(message, &data[count], len); |
| 8803 |
count += len; |
| 8804 |
|
| 8805 |
int limit = 2; |
| 8806 |
int cur_marker_num; |
| 8807 |
|
| 8808 |
objectcxx . . $ object# *pobj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[pnum].objnumcxx . . $ player#objnum.]; |
| 8809 |
|
| 8810 |
if (Playerscxx . . $ Players.[pnum].num_markerscxx . . $ player#num_markers. >= limit) { |
| 8811 |
// Delete the oldest marker |
| 8812 |
int found = -1; |
| 8813 |
float low_time = 999999999.0f; |
| 8814 |
for (int i = 0; i <= Highest_object_indexcxx . . $ Highest_object_index.; i++) { |
| 8815 |
if (Objectscxx . . $ Objects.[i].typecxx . . $ object#type. == OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`! && Objectscxx . . $ Objects.[i].parent_handlecxx . . $ object#parent_handle. == pobj->handlecxx . . $ object#handle. && |
| 8816 |
Objectscxx . . $ Objects.[i].creation_timecxx . . $ object#creation_time. < low_time) { |
| 8817 |
found = i; |
| 8818 |
low_time = Objectscxx . . $ Objects.[i].creation_timecxx . . $ object#creation_time.; |
| 8819 |
} |
| 8820 |
} |
| 8821 |
|
| 8822 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(found != -1); |
| 8823 |
|
| 8824 |
SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(&Objectscxx . . $ Objects.[found], true, false); |
| 8825 |
|
| 8826 |
cur_marker_num = Objectscxx . . $ Objects.[found].idcxx . . $ object#id.; |
| 8827 |
} else { |
| 8828 |
cur_marker_num = pnum * 2 + Playerscxx . . $ Players.[pnum].num_markerscxx . . $ player#num_markers.; |
| 8829 |
Playerscxx . . $ Players.[pnum].num_markerscxx . . $ player#num_markers.++; |
| 8830 |
} |
| 8831 |
|
| 8832 |
int objnum = ObjCreatecxx . . $ ObjCreate(849c3da80a4f387f).(OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!, cur_marker_num, pobj->roomnumcxx . . $ object#roomnum., &pobj->poscxx . . $ object#pos., &pobj->orientcxx . . $ object#orient., pobj->handlecxx . . $ object#handle.); |
| 8833 |
|
| 8834 |
if (objnum >= 0) { |
| 8835 |
strcpy(MarkerMessagescxx . . $ MarkerMessages.[cur_marker_num], message); |
| 8836 |
MultiSendObjectcxx . . $ MultiSendObject(d7354c60e612ede5).(&Objectscxx . . $ Objects.[objnum], 0); |
| 8837 |
} |
| 8838 |
} |
| 8839 |
|
| 8840 |
// Client is asking for a marker |
| 8841 |
void MultiSendRequestForMarkercxx . . $ MultiSendRequestForMarker(fda57c8427c60377).(char *message) { |
| 8842 |
int count = 0; |
| 8843 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8844 |
int size_offset; |
| 8845 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_MARKERcxx . . $ `Descent3/multi.h:628:9`!, data, &count); |
| 8846 |
|
| 8847 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 8848 |
|
| 8849 |
uint8_tcxx . . $ uint8_t# len = strlen(message) + 1; |
| 8850 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(len, data, &count); |
| 8851 |
memcpy(data + count, message, len); |
| 8852 |
count += len; |
| 8853 |
|
| 8854 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8855 |
|
| 8856 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 8857 |
MultiDoRequestMarkercxx . . $ MultiDoRequestMarker(f25546b61a629de7).(data); |
| 8858 |
else |
| 8859 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 8860 |
} |
| 8861 |
|
| 8862 |
// The server is telling me to adjust my position |
| 8863 |
void MultiDoAdjustPositioncxx . . $ MultiDoAdjustPosition(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8864 |
int count = 0; |
| 8865 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8866 |
|
| 8867 |
float timestamp = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 8868 |
|
| 8869 |
vectorcxx . . $ vector# newpos, newvel; |
| 8870 |
|
| 8871 |
// memcpy (&newpos,&data[count],sizeof(vector)); |
| 8872 |
// count+=sizeof(vector); |
| 8873 |
newpos =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 8874 |
// memcpy (&newvel,&data[count],sizeof(vector)); |
| 8875 |
// count+=sizeof(vector); |
| 8876 |
newvel =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 8877 |
|
| 8878 |
int roomnum = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 8879 |
|
| 8880 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.]; |
| 8881 |
|
| 8882 |
ObjSetPoscxx . . $ ObjSetPos(bbb518390bedd509).(obj, &newpos, roomnum, &obj->orientcxx . . $ object#orient., true); |
| 8883 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). newvel; |
| 8884 |
|
| 8885 |
float save_frametime = Frametimecxx . . $ Frametime.; |
| 8886 |
int start_move = -1, end_move = -1; |
| 8887 |
|
| 8888 |
// Now go through and adjust our position based on our saved moves |
| 8889 |
for (int i = 0; i < MAX_SAVED_MOVEScxx . . $ `Descent3/multi_client.h:27:9`!; i++) { |
| 8890 |
int next = i + 1; |
| 8891 |
int prev = i - 1; |
| 8892 |
|
| 8893 |
if (next == MAX_SAVED_MOVEScxx . . $ `Descent3/multi_client.h:27:9`!) |
| 8894 |
next = 0; |
| 8895 |
if (prev == -1) |
| 8896 |
prev = MAX_SAVED_MOVEScxx . . $ `Descent3/multi_client.h:27:9`! - 1; |
| 8897 |
|
| 8898 |
if (start_move == -1 && SavedMovescxx . . $ SavedMoves.[prev].timestampcxx . . $ saved_move#timestamp. < timestamp && SavedMovescxx . . $ SavedMoves.[i].timestampcxx . . $ saved_move#timestamp. >= timestamp) |
| 8899 |
start_move = i; |
| 8900 |
if (end_move == -1 && SavedMovescxx . . $ SavedMoves.[i].timestampcxx . . $ saved_move#timestamp. >= timestamp && SavedMovescxx . . $ SavedMoves.[next].timestampcxx . . $ saved_move#timestamp. < timestamp) |
| 8901 |
end_move = i; |
| 8902 |
} |
| 8903 |
|
| 8904 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(start_move != -1); // HUH? We don't have a copy of this move in our list |
| 8905 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(end_move != -1); |
| 8906 |
|
| 8907 |
int cur_move = start_move; |
| 8908 |
int done = 0; |
| 8909 |
|
| 8910 |
vectorcxx . . $ vector# save_thrust, save_rotthrust; |
| 8911 |
save_thrust =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust.; |
| 8912 |
save_rotthrust =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust.; |
| 8913 |
|
| 8914 |
while (!done) { |
| 8915 |
int next = cur_move + 1; |
| 8916 |
int next_end = end_move + 1; |
| 8917 |
|
| 8918 |
if (next == MAX_SAVED_MOVEScxx . . $ `Descent3/multi_client.h:27:9`!) |
| 8919 |
next = 0; |
| 8920 |
|
| 8921 |
if (next_end == MAX_SAVED_MOVEScxx . . $ `Descent3/multi_client.h:27:9`!) |
| 8922 |
next_end = 0; |
| 8923 |
|
| 8924 |
float delta; |
| 8925 |
|
| 8926 |
if (next == next_end) |
| 8927 |
delta = 0.1f; |
| 8928 |
else |
| 8929 |
delta = SavedMovescxx . . $ SavedMoves.[next].timestampcxx . . $ saved_move#timestamp. - SavedMovescxx . . $ SavedMoves.[cur_move].timestampcxx . . $ saved_move#timestamp.; |
| 8930 |
|
| 8931 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(delta >= 0); |
| 8932 |
|
| 8933 |
Frametimecxx . . $ Frametime. = delta; |
| 8934 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). SavedMovescxx . . $ SavedMoves.[cur_move].thrustcxx . . $ saved_move#thrust.; |
| 8935 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). SavedMovescxx . . $ SavedMoves.[cur_move].rotthrustcxx . . $ saved_move#rotthrust.; |
| 8936 |
|
| 8937 |
do_physics_simcxx . . $ do_physics_sim(419c470199a90a97).(obj); |
| 8938 |
|
| 8939 |
if (cur_move == end_move) |
| 8940 |
done = 1; |
| 8941 |
cur_move = next; |
| 8942 |
} |
| 8943 |
|
| 8944 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). save_rotthrust; |
| 8945 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). save_thrust; |
| 8946 |
Frametimecxx . . $ Frametime. = save_frametime; |
| 8947 |
} |
| 8948 |
|
| 8949 |
// Server is telling the client to update his position |
| 8950 |
void MultiSendAdjustPositioncxx . . $ MultiSendAdjustPosition(43c79ee2f1b9aefe).(int slot, float timestamp) { |
| 8951 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 8952 |
|
| 8953 |
int size_offset; |
| 8954 |
int count = 0; |
| 8955 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 8956 |
|
| 8957 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.]; |
| 8958 |
|
| 8959 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_ADJUST_POSITIONcxx . . $ `Descent3/multi.h:632:9`!, data, &count); |
| 8960 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(timestamp, data, &count); |
| 8961 |
|
| 8962 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->poscxx . . $ object#pos..xcxx . . $ vector#x., data, &count); |
| 8963 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->poscxx . . $ object#pos..ycxx . . $ vector#y., data, &count); |
| 8964 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->poscxx . . $ object#pos..zcxx . . $ vector#z., data, &count); |
| 8965 |
|
| 8966 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity..xcxx . . $ vector#x., data, &count); |
| 8967 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity..ycxx . . $ vector#y., data, &count); |
| 8968 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..velocitycxx . . $ physics_info#velocity..zcxx . . $ vector#z., data, &count); |
| 8969 |
|
| 8970 |
MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(obj->roomnumcxx . . $ object#roomnum., data, &count); |
| 8971 |
|
| 8972 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 8973 |
|
| 8974 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&NetPlayerscxx . . $ NetPlayers.[slot].addrcxx . . $ netplayer#addr., data, count, 0); |
| 8975 |
} |
| 8976 |
|
| 8977 |
float Last_update_timecxx . . $ Last_update_time.[MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!]; |
| 8978 |
// Client is asking permission to move |
| 8979 |
void MultiDoRequestToMovecxx . . $ MultiDoRequestToMove(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 8980 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 8981 |
|
| 8982 |
int count = 0; |
| 8983 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 8984 |
|
| 8985 |
vectorcxx . . $ vector# thrust, rotthrust, pos; |
| 8986 |
matrixcxx . . $ matrix# orient; |
| 8987 |
|
| 8988 |
int slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 8989 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.]; |
| 8990 |
|
| 8991 |
float timestamp = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 8992 |
|
| 8993 |
if (timestamp < NetPlayerscxx . . $ NetPlayers.[slot].packet_timecxx . . $ netplayer#packet_time.) |
| 8994 |
return; // Got out of order packet |
| 8995 |
|
| 8996 |
if (Playerscxx . . $ Players.[slot].flagscxx . . $ player#flags. & (PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`! | PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`!)) |
| 8997 |
return; |
| 8998 |
|
| 8999 |
// Get pos |
| 9000 |
// memcpy (&pos,&data[count],sizeof(vector)); |
| 9001 |
// count+=sizeof(vector); |
| 9002 |
pos =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 9003 |
|
| 9004 |
// Get thrust |
| 9005 |
// memcpy (&thrust,&data[count],sizeof(vector)); |
| 9006 |
// count+=sizeof(vector); |
| 9007 |
thrust =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 9008 |
|
| 9009 |
// Get rotational thrust |
| 9010 |
// memcpy (&rotthrust,&data[count],sizeof(vector)); |
| 9011 |
// count+=sizeof(vector); |
| 9012 |
rotthrust =cxx . . $ vector#`operator=`(c0842353a20857d). MultiGetVectorcxx . . $ MultiGetVector(6598874d217f6139).(data, &count); |
| 9013 |
|
| 9014 |
// Get orientation |
| 9015 |
uint16_tcxx . . $ uint16_t# p = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 9016 |
uint16_tcxx . . $ uint16_t# h = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 9017 |
uint16_tcxx . . $ uint16_t# b = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 9018 |
|
| 9019 |
vm_AnglesToMatrixcxx . . $ vm_AnglesToMatrix(654fa9e3c9c3be99).(&orient, p, h, b); |
| 9020 |
|
| 9021 |
float delta_time = Gametimecxx . . $ Gametime. - NetPlayerscxx . . $ NetPlayers.[slot].packet_timecxx . . $ netplayer#packet_time.; |
| 9022 |
NetPlayerscxx . . $ NetPlayers.[slot].packet_timecxx . . $ netplayer#packet_time. = Gametimecxx . . $ Gametime.; |
| 9023 |
|
| 9024 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). thrust; |
| 9025 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). rotthrust; |
| 9026 |
|
| 9027 |
// Perform autonomous movement |
| 9028 |
float save_frametime = Frametimecxx . . $ Frametime.; |
| 9029 |
|
| 9030 |
obj->movement_typecxx . . $ object#movement_type. = MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!; |
| 9031 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. |= PF_USES_THRUSTcxx . . $ `Descent3/object_external.h:319:9`!; |
| 9032 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. &= ~PF_FIXED_VELOCITYcxx . . $ `Descent3/object_external.h:324:9`!; |
| 9033 |
|
| 9034 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). thrust; |
| 9035 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). rotthrust; |
| 9036 |
Frametimecxx . . $ Frametime. = delta_time; |
| 9037 |
|
| 9038 |
do_physics_simcxx . . $ do_physics_sim(419c470199a90a97).(obj); |
| 9039 |
|
| 9040 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 9041 |
obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). Zero_vectorcxx . . $ Zero_vector.; |
| 9042 |
obj->orientcxx . . $ object#orient. =cxx . . $ matrix#`operator=`(4c6f8b29806742). orient; |
| 9043 |
|
| 9044 |
bool client_error = 0; |
| 9045 |
if (vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&pos, &obj->poscxx . . $ object#pos.) > 5) |
| 9046 |
client_error = true; |
| 9047 |
|
| 9048 |
if (Gametimecxx . . $ Gametime. - Last_update_timecxx . . $ Last_update_time.[slot] > .15) |
| 9049 |
client_error = true; |
| 9050 |
|
| 9051 |
// If there is too much client error then adjust |
| 9052 |
if (client_error) { |
| 9053 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Correcting, deltatime=%f dist=%f\n", delta_time, vm_VectorDistance(&pos, &obj->pos)); |
| 9054 |
MultiSendAdjustPositioncxx . . $ MultiSendAdjustPosition(43c79ee2f1b9aefe).(slot, timestamp); |
| 9055 |
Last_update_timecxx . . $ Last_update_time.[slot] = Gametimecxx . . $ Gametime.; |
| 9056 |
} |
| 9057 |
|
| 9058 |
Frametimecxx . . $ Frametime. = save_frametime; |
| 9059 |
} |
| 9060 |
|
| 9061 |
// Sets up a packet so that we can request to move from server |
| 9062 |
int MultiStuffRequestToMovecxx . . $ MultiStuffRequestToMove(b2e27cdb9bef2230).(uint8_tcxx . . $ uint8_t# *data) { |
| 9063 |
int size_offset; |
| 9064 |
int count = 0; |
| 9065 |
|
| 9066 |
objectcxx . . $ object# *obj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].objnumcxx . . $ player#objnum.]; |
| 9067 |
|
| 9068 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_TO_MOVEcxx . . $ `Descent3/multi.h:631:9`!, data, &count); |
| 9069 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(Player_numcxx . . $ Player_num., data, &count); |
| 9070 |
|
| 9071 |
// Add timestamp |
| 9072 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(Gametimecxx . . $ Gametime., data, &count); |
| 9073 |
|
| 9074 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->poscxx . . $ object#pos..xcxx . . $ vector#x., data, &count); |
| 9075 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->poscxx . . $ object#pos..ycxx . . $ vector#y., data, &count); |
| 9076 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->poscxx . . $ object#pos..zcxx . . $ vector#z., data, &count); |
| 9077 |
|
| 9078 |
// Do acceleration |
| 9079 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust..xcxx . . $ vector#x., data, &count); |
| 9080 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust..ycxx . . $ vector#y., data, &count); |
| 9081 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..thrustcxx . . $ physics_info#thrust..zcxx . . $ vector#z., data, &count); |
| 9082 |
|
| 9083 |
// Do rotational acceleration |
| 9084 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust..xcxx . . $ vector#x., data, &count); |
| 9085 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust..ycxx . . $ vector#y., data, &count); |
| 9086 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(obj->mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust..zcxx . . $ vector#z., data, &count); |
| 9087 |
|
| 9088 |
// Do orientation |
| 9089 |
angveccxx . . $ angvec# angs; |
| 9090 |
vm_ExtractAnglesFromMatrixcxx . . $ vm_ExtractAnglesFromMatrix(5f9a6d6f613ae256).(&angs, &obj->orientcxx . . $ object#orient.); |
| 9091 |
|
| 9092 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.pcxx . . $ angvec#p., data, &count); |
| 9093 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.hcxx . . $ angvec#h., data, &count); |
| 9094 |
MultiAddShortcxx . . $ MultiAddShort(25946db777347f55).(angs.bcxx . . $ angvec#b., data, &count); |
| 9095 |
|
| 9096 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 9097 |
|
| 9098 |
return count; |
| 9099 |
} |
| 9100 |
|
| 9101 |
// Server is giving us a list of objects that aren't visible |
| 9102 |
void MultiDoGenericNonViscxx . . $ MultiDoGenericNonVis(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 9103 |
int count = 0; |
| 9104 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 9105 |
|
| 9106 |
int num = MultiGetShortcxx . . $ MultiGetShort(82c3ad32bc1210f5).(data, &count); |
| 9107 |
for (int i = 0; i < num; i++) { |
| 9108 |
uint16_tcxx . . $ uint16_t# objnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 9109 |
|
| 9110 |
objnum = Server_object_listcxx . . $ Server_object_list.[objnum]; |
| 9111 |
if (objnum == 65535 || !(Objectscxx . . $ Objects.[objnum].flagscxx . . $ object#flags. & OF_SERVER_OBJECTcxx . . $ `Descent3/object_external.h:291:9`!)) { |
| 9112 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Get Jason, invalid object received! |
| 9113 |
continue; |
| 9114 |
} |
| 9115 |
|
| 9116 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(IS_GENERICcxx . . $ `Descent3/object_external.h:190:9`!(Objects[objnum].type)); |
| 9117 |
|
| 9118 |
Objectscxx . . $ Objects.[objnum].render_typecxx . . $ object#render_type. = RT_NONEcxx . . $ `Descent3/object_external.h:257:9`!; |
| 9119 |
Objectscxx . . $ Objects.[objnum].mtypecxx . . $ object#mtype..phys_infocxx . . $ object#$anonymous_type_8#phys_info..flagscxx . . $ physics_info#flags. |= PF_NO_COLLIDEcxx . . $ `Descent3/object_external.h:331:9`!; |
| 9120 |
} |
| 9121 |
} |
| 9122 |
|
| 9123 |
// Tell clients to break some glass |
| 9124 |
void MultiSendBreakGlasscxx . . $ MultiSendBreakGlass(5c94b6ab436d91cf).(roomcxx . . $ room# *rp, int facenum) { |
| 9125 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 9126 |
|
| 9127 |
int count = 0; |
| 9128 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 9129 |
int size_offset; |
| 9130 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_BREAK_GLASScxx . . $ `Descent3/multi.h:637:9`!, data, &count); |
| 9131 |
|
| 9132 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(rp - Roomscxx . . $ Rooms., data, &count); |
| 9133 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(facenum, data, &count); |
| 9134 |
|
| 9135 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 9136 |
|
| 9137 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, false); |
| 9138 |
} |
| 9139 |
|
| 9140 |
// Server is telling us to break some glass |
| 9141 |
void MultiDoBreakGlasscxx . . $ MultiDoBreakGlass(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 9142 |
int count = 0; |
| 9143 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 9144 |
|
| 9145 |
int roomnum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 9146 |
int facenum = MultiGetUshortcxx . . $ MultiGetUshort(4574463662eb5370).(data, &count); |
| 9147 |
|
| 9148 |
BreakGlassFacecxx . . $ BreakGlassFace(13a53ec972efd3cd).(&Roomscxx . . $ Rooms.[roomnum], facenum); |
| 9149 |
} |
| 9150 |
|
| 9151 |
// Server says a player has changed rank! |
| 9152 |
void MultiDoChangeRankcxx . . $ MultiDoChangeRank(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 9153 |
int count = 0; |
| 9154 |
char str[255]; |
| 9155 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 9156 |
|
| 9157 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 9158 |
MultiGetStringcxx . . $ MultiGetString(e054694168e1d38e).(str, data, &count); |
| 9159 |
int goodnews = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 9160 |
float newrank = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 9161 |
|
| 9162 |
AddBlinkingHUDMessagecxx . . $ AddBlinkingHUDMessage(f90d95ab21fd6d97).(str); |
| 9163 |
|
| 9164 |
// Play a sound |
| 9165 |
if (goodnews) { |
| 9166 |
int soundnum = FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).("CTFScore1"); |
| 9167 |
if (soundnum > 0) |
| 9168 |
Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(d251026853493025).(soundnum); |
| 9169 |
} else { |
| 9170 |
int soundnum = FindSoundNamecxx . . $ FindSoundName(5c4306d8553b3696).("CTFLostFlag1"); |
| 9171 |
if (soundnum > 0) |
| 9172 |
Sound_systemcxx . . $ Sound_system..Play2dSoundcxx . . $ hlsSystem#Play2dSound(d251026853493025).(soundnum); |
| 9173 |
} |
| 9174 |
|
| 9175 |
Playerscxx . . $ Players.[pnum].rankcxx . . $ player#rank. = newrank; |
| 9176 |
} |
| 9177 |
|
| 9178 |
// Server is telling me to strip bare! |
| 9179 |
void MultiDoStripPlayercxx . . $ MultiDoStripPlayer(ea2b65c19bfee284).(int slot, uint8_tcxx . . $ uint8_t# *data) { |
| 9180 |
if (slot != 0) { |
| 9181 |
// server didnt send this to us?! |
| 9182 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 9183 |
return; |
| 9184 |
} |
| 9185 |
|
| 9186 |
int count = 0; |
| 9187 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 9188 |
slot = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 9189 |
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.)) { |
| 9190 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 9191 |
return; |
| 9192 |
} |
| 9193 |
|
| 9194 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "I'm stripping %d bare! (of weapons)\n", slot); |
| 9195 |
|
| 9196 |
objectcxx . . $ object# *pobj = &Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.]; |
| 9197 |
|
| 9198 |
// take quad fire |
| 9199 |
static int quad_id = -2; |
| 9200 |
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`! || 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`!) { |
| 9201 |
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`!; |
| 9202 |
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`!; |
| 9203 |
|
| 9204 |
if (quad_id == -2) |
| 9205 |
quad_id = FindObjectIDNamecxx . . $ FindObjectIDName(5c4306d8553b3696).("QuadLaser"); |
| 9206 |
|
| 9207 |
if (quad_id > -1) { |
| 9208 |
Playerscxx . . $ Players.[slot].inventorycxx . . $ player#inventory..Removecxx . . $ Inventory#Remove(cf9ef193275fa6d8).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, quad_id); |
| 9209 |
} |
| 9210 |
} |
| 9211 |
|
| 9212 |
int i; |
| 9213 |
|
| 9214 |
// remove weapons |
| 9215 |
for (i = 0; i < MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`!; i++) { |
| 9216 |
Playerscxx . . $ Players.[slot].weapon_ammocxx . . $ player#weapon_ammo.[i] = 0; |
| 9217 |
Playerscxx . . $ Players.[slot].weapon_flagscxx . . $ player#weapon_flags. &= ~HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(i); |
| 9218 |
} |
| 9219 |
|
| 9220 |
// reset lasers back on |
| 9221 |
Playerscxx . . $ Players.[slot].weapon_flagscxx . . $ player#weapon_flags. = HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(LASER_INDEXcxx . . $ `Descent3/weapon_external.h:22:9`!) + HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(FLARE_INDEXcxx . . $ `Descent3/weapon_external.h:43:9`!) + HAS_FLAGcxx . . $ `Descent3/weapon.h:215:9`!(CONCUSSION_INDEXcxx . . $ `Descent3/weapon_external.h:32:9`!); |
| 9222 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!].indexcxx . . $ player_weapon#index. = LASER_INDEXcxx . . $ `Descent3/weapon_external.h:22:9`!; |
| 9223 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!].firing_timecxx . . $ player_weapon#firing_time. = 0; |
| 9224 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_PRIMARYcxx . . $ `Descent3/player_external.h:108:9`!].sound_handlecxx . . $ player_weapon#sound_handle. = -1; |
| 9225 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!].indexcxx . . $ player_weapon#index. = CONCUSSION_INDEXcxx . . $ `Descent3/weapon_external.h:32:9`!; |
| 9226 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!].firing_timecxx . . $ player_weapon#firing_time. = 0; |
| 9227 |
Playerscxx . . $ Players.[slot].weaponcxx . . $ player#weapon.[PW_SECONDARYcxx . . $ `Descent3/player_external.h:109:9`!].sound_handlecxx . . $ player_weapon#sound_handle. = -1; |
| 9228 |
|
| 9229 |
// set energy to 0 |
| 9230 |
Playerscxx . . $ Players.[slot].energycxx . . $ player#energy. = 0; |
| 9231 |
|
| 9232 |
// remove counter measures |
| 9233 |
Playerscxx . . $ Players.[slot].counter_measurescxx . . $ player#counter_measures..Resetcxx . . $ Inventory#Reset(b994e01f1c45a386).(true, INVRESET_DEATHSPEWcxx . . $ `Descent3/Inventory.h:203:9`!); |
| 9234 |
} |
| 9235 |
|
| 9236 |
// Strips a player bare of weapons |
| 9237 |
void MultiSendStripPlayercxx . . $ MultiSendStripPlayer(d4f767463ce0a6b3).(int slot) { |
| 9238 |
if (Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!) { |
| 9239 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 9240 |
} else { |
| 9241 |
if (slot == -1) { |
| 9242 |
// it's not a multiplayer game, bash to just us |
| 9243 |
slot = Player_numcxx . . $ Player_num.; |
| 9244 |
} |
| 9245 |
} |
| 9246 |
|
| 9247 |
int count = 0, save_count; |
| 9248 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 9249 |
int size_offset; |
| 9250 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_STRIP_PLAYERcxx . . $ `Descent3/multi.h:647:9`!, data, &count); |
| 9251 |
save_count = count; |
| 9252 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 9253 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 9254 |
|
| 9255 |
if (slot != -1) { |
| 9256 |
MultiDoStripPlayercxx . . $ MultiDoStripPlayer(ea2b65c19bfee284).(Player_numcxx . . $ Player_num., data); |
| 9257 |
if (slot != Player_numcxx . . $ Player_num.) |
| 9258 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[slot].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 9259 |
} else { |
| 9260 |
// strip all the players |
| 9261 |
int i; |
| 9262 |
for (i = 0; i < MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`!; i++) { |
| 9263 |
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`!)) { |
| 9264 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(i, data, &save_count); // change the value in the packet |
| 9265 |
MultiDoStripPlayercxx . . $ MultiDoStripPlayer(ea2b65c19bfee284).(Player_numcxx . . $ Player_num., data); |
| 9266 |
if (i != Player_numcxx . . $ Player_num.) |
| 9267 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[i].reliable_socketcxx . . $ netplayer#reliable_socket., data, count, false); |
| 9268 |
} |
| 9269 |
} |
| 9270 |
} |
| 9271 |
} |
| 9272 |
|
| 9273 |
// Server is telling me about a player rank |
| 9274 |
void MultiDoInitialRankcxx . . $ MultiDoInitialRank(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 9275 |
int count = 0; |
| 9276 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 9277 |
|
| 9278 |
int pnum = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 9279 |
float rank = MultiGetFloatcxx . . $ MultiGetFloat(fe244d2c191680c4).(data, &count); |
| 9280 |
|
| 9281 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got initial rank for player %d (%f)\n", pnum, rank); |
| 9282 |
|
| 9283 |
Playerscxx . . $ Players.[pnum].rankcxx . . $ player#rank. = rank; |
| 9284 |
} |
| 9285 |
|
| 9286 |
// Tell all the clients about this players rank |
| 9287 |
void MultiSendInitialRankcxx . . $ MultiSendInitialRank(d4f767463ce0a6b3).(int pnum) { |
| 9288 |
MULTI_ASSERT_NOMESSAGEcxx . . $ `Descent3/multi.cpp:1849:9`!(Netgame.local_role == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!); |
| 9289 |
|
| 9290 |
int count = 0; |
| 9291 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 9292 |
int size_offset; |
| 9293 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_INITIAL_RANKcxx . . $ `Descent3/multi.h:645:9`!, data, &count); |
| 9294 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(pnum, data, &count); |
| 9295 |
MultiAddFloatcxx . . $ MultiAddFloat(a76b0cec949d1afe).(Playerscxx . . $ Players.[pnum].rankcxx . . $ player#rank., data, &count); |
| 9296 |
|
| 9297 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending initial rank for player %d\n", pnum); |
| 9298 |
|
| 9299 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 9300 |
|
| 9301 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, false); |
| 9302 |
} |
| 9303 |
|
| 9304 |
// Server only function to clear a Guidebot for a disconnected player |
| 9305 |
void MultiClearGuidebotcxx . . $ MultiClearGuidebot(d4f767463ce0a6b3).(int slot) { |
| 9306 |
if (!(Game_modecxx . . $ Game_mode. & GM_MULTIcxx . . $ `Descent3/game.h:288:9`!)) |
| 9307 |
return; |
| 9308 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 9309 |
return; |
| 9310 |
if (!(Netgamecxx . . $ Netgame..flagscxx . . $ netgame_info#flags. & NF_ALLOWGUIDEBOTcxx . . $ `Descent3/multi_external.h:232:9`!)) |
| 9311 |
return; |
| 9312 |
|
| 9313 |
// Kill off the old buddy bot |
| 9314 |
objectcxx . . $ object# *buddy = ObjGetcxx . . $ ObjGet(11672e354c0b263a).(Buddy_handlecxx . . $ Buddy_handle.[slot]); |
| 9315 |
if (buddy) { |
| 9316 |
SetObjectDeadFlagcxx . . $ SetObjectDeadFlag(80a724877f6428f2).(buddy, true, false); |
| 9317 |
} |
| 9318 |
Buddy_handlecxx . . $ Buddy_handle.[slot] = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 9319 |
|
| 9320 |
// Recreate a buddy bot |
| 9321 |
int parent_handle; |
| 9322 |
if (Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum. < 0 || Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum. > Highest_object_indexcxx . . $ Highest_object_index. || |
| 9323 |
Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].typecxx . . $ object#type. == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 9324 |
parent_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 9325 |
} else { |
| 9326 |
parent_handle = Objectscxx . . $ Objects.[Playerscxx . . $ Players.[slot].objnumcxx . . $ player#objnum.].handlecxx . . $ object#handle.; |
| 9327 |
} |
| 9328 |
|
| 9329 |
// BLACKPYRO |
| 9330 |
int objnum = ObjCreatecxx . . $ ObjCreate(849c3da80a4f387f).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!, Player_objectcxx . . $ Player_object.->roomnumcxx . . $ object#roomnum., &Player_objectcxx . . $ Player_object.->poscxx . . $ object#pos., NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!, parent_handle); |
| 9331 |
|
| 9332 |
ASSERTcxx . . $ `misc/pserror.h:246:9`!(objnum != -1); |
| 9333 |
if (objnum == -1) |
| 9334 |
return; |
| 9335 |
|
| 9336 |
// tell the client about the new buddy |
| 9337 |
MultiSendObjectcxx . . $ MultiSendObject(d7354c60e612ede5).(&Objectscxx . . $ Objects.[objnum], 0); |
| 9338 |
|
| 9339 |
InitObjectScriptscxx . . $ InitObjectScripts(674fac047436fc5b).(&Objectscxx . . $ Objects.[objnum], true); |
| 9340 |
|
| 9341 |
Buddy_handlecxx . . $ Buddy_handle.[slot] = Objectscxx . . $ Objects.[objnum].handlecxx . . $ object#handle.; |
| 9342 |
ObjGhostObjectcxx . . $ ObjGhostObject(d4f767463ce0a6b3).(objnum); |
| 9343 |
|
| 9344 |
MultiSendGhostObjectcxx . . $ MultiSendGhostObject(674fac047436fc5b).(&Objectscxx . . $ Objects.[objnum], true); |
| 9345 |
|
| 9346 |
// now update the buddy handle list of the clients |
| 9347 |
int count = 0; |
| 9348 |
int size_offset; |
| 9349 |
uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 9350 |
|
| 9351 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Sending Buddy_handle update to clients for Buddy#%d\n", slot); |
| 9352 |
|
| 9353 |
size_offset = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_WORLD_STATEScxx . . $ `Descent3/multi.h:611:9`!, data, &count); |
| 9354 |
|
| 9355 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(WS_BUDDYBOTUPDATEcxx . . $ `Descent3/multi_world_state.h:38:9`!, data, &count); |
| 9356 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(slot, data, &count); |
| 9357 |
MultiAddUshortcxx . . $ MultiAddUshort(309f537dbae2306e).(Buddy_handlecxx . . $ Buddy_handle.[slot] & HANDLE_OBJNUM_MASKcxx . . $ `Descent3/object.h:642:9`!, data, &count); |
| 9358 |
|
| 9359 |
MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(WS_ENDcxx . . $ `Descent3/multi_world_state.h:46:9`!, data, &count); |
| 9360 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, data, size_offset); |
| 9361 |
|
| 9362 |
// Send it out |
| 9363 |
MultiSendReliablyToAllExceptcxx . . $ MultiSendReliablyToAllExcept(ff9a57d40a1b8fe8).(Player_numcxx . . $ Player_num., data, count, NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, false); |
| 9364 |
} |
| 9365 |
|
| 9366 |
void RequestPlayerListcxx . . $ RequestPlayerList(f2758234d0c8cb80).(network_addresscxx . . $ network_address# *addr) { |
| 9367 |
uint8_tcxx . . $ uint8_t# outdata[10]; |
| 9368 |
int count = 0; |
| 9369 |
int size; |
| 9370 |
|
| 9371 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_REQUEST_PLAYERLISTcxx . . $ `Descent3/multi.h:639:9`!, outdata, &count); |
| 9372 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 9373 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(addr, outdata, count, 0); |
| 9374 |
} |
| 9375 |
|
| 9376 |
// a client is requesting a list of players... so give it to em! |
| 9377 |
void DoReqPlayerListcxx . . $ DoReqPlayerList(f2758234d0c8cb80).(network_addresscxx . . $ network_address# *addr) { |
| 9378 |
uint8_tcxx . . $ uint8_t# outdata[((CALLSIGN_LENcxx . . $ `Descent3/player_external_struct.h:89:9`! + 1) * MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!) + 1]; |
| 9379 |
int count = 0; |
| 9380 |
int size; |
| 9381 |
|
| 9382 |
memset(outdata, 0, sizeof(outdata)); |
| 9383 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_PLAYERLIST_DATAcxx . . $ `Descent3/multi.h:640:9`!, outdata, &count); |
| 9384 |
|
| 9385 |
uint16_tcxx . . $ uint16_t# icurrplayers = 0; |
| 9386 |
int i = 0; |
| 9387 |
if (Dedicated_servercxx . . $ Dedicated_server.) { |
| 9388 |
// Skip the server player |
| 9389 |
i = 1; |
| 9390 |
} |
| 9391 |
|
| 9392 |
for (; i < MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!; i++) { |
| 9393 |
if ((NetPlayerscxx . . $ NetPlayers.[i].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!) && (Playerscxx . . $ Players.[i].callsigncxx . . $ player#callsign.[0])) { |
| 9394 |
memcpy(outdata + count, Playerscxx . . $ Players.[i].callsigncxx . . $ player#callsign., strlen(Playerscxx . . $ Players.[i].callsigncxx . . $ player#callsign.) + 1); |
| 9395 |
count += strlen(Playerscxx . . $ Players.[i].callsigncxx . . $ player#callsign.) + 1; |
| 9396 |
} |
| 9397 |
} |
| 9398 |
// Add one last 0 to signal the end of the player list |
| 9399 |
count++; |
| 9400 |
outdata[count] = 0; |
| 9401 |
|
| 9402 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 9403 |
|
| 9404 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(addr, outdata, count, 0); |
| 9405 |
} |
| 9406 |
|
| 9407 |
char *Multi_recieved_player_listcxx . . $ Multi_recieved_player_list. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 9408 |
bool Multi_got_player_listcxx . . $ Multi_got_player_list. = false; |
| 9409 |
|
| 9410 |
void DoPlayerListDatacxx . . $ DoPlayerListData(fc0f0e1646c32816).(uint8_tcxx . . $ uint8_t# *data, int len) { |
| 9411 |
int count = 0; |
| 9412 |
if (Multi_recieved_player_listcxx . . $ Multi_recieved_player_list. == NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) { |
| 9413 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Received a player list packet when we weren't expecting one. Ignoring.\n"); |
| 9414 |
return; |
| 9415 |
} |
| 9416 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 9417 |
memcpy(Multi_recieved_player_listcxx . . $ Multi_recieved_player_list., data + count, len); |
| 9418 |
Multi_got_player_listcxx . . $ Multi_got_player_list. = true; |
| 9419 |
} |
| 9420 |
|
| 9421 |
// Tell a player what ship they are supposed to switch to |
| 9422 |
// if the one they chose isn't allowed. |
| 9423 |
void MultiBashPlayerShipcxx . . $ MultiBashPlayerShip(577809987ad7a468).(int slot, char *ship) { |
| 9424 |
uint8_tcxx . . $ uint8_t# outdata[100]; |
| 9425 |
int count = 0; |
| 9426 |
int size; |
| 9427 |
|
| 9428 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_BASHPLAYER_SHIPcxx . . $ `Descent3/multi.h:643:9`!, outdata, &count); |
| 9429 |
strcpy((char *)outdata + count, ship); |
| 9430 |
count += strlen(ship) + 1; |
| 9431 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 9432 |
nw_SendReliablecxx . . $ nw_SendReliable(f6b56715d3e5e15a).(NetPlayerscxx . . $ NetPlayers.[slot].reliable_socketcxx . . $ netplayer#reliable_socket., outdata, count, true); |
| 9433 |
} |
| 9434 |
|
| 9435 |
int ObjInitTypeSpecificcxx . . $ ObjInitTypeSpecific(d27f719725f38807).(objectcxx . . $ object# *objp, bool reinitializing); |
| 9436 |
|
| 9437 |
void MultiDoBashPlayerShipcxx . . $ MultiDoBashPlayerShip(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 9438 |
int count = 0; |
| 9439 |
|
| 9440 |
SKIP_HEADERcxx . . $ SKIP_HEADER(849dbebf9185c2d3).(data, &count); |
| 9441 |
int ship_index = FindShipNamecxx . . $ FindShipName(5c4306d8553b3696).((const char *)data + count); |
| 9442 |
if (ship_index < 0) |
| 9443 |
ship_index = 0; |
| 9444 |
|
| 9445 |
// If told to switch to the Black Pyro, make sure it's allowed |
| 9446 |
if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(Ships[ship_index].name, "Black Pyro")) { |
| 9447 |
extern bool MercInstalledcxx . . $ MercInstalled(c9857a73d68e59ba).(); |
| 9448 |
if (!MercInstalledcxx . . $ MercInstalled(c9857a73d68e59ba).()) { |
| 9449 |
BailOnMultiplayercxx . . $ BailOnMultiplayer(85c52e162fed56f9).("Exiting: Game requires Black Pyro"); |
| 9450 |
} |
| 9451 |
} |
| 9452 |
|
| 9453 |
AddHUDMessagecxx . . $ AddHUDMessage(f90d95ab21fd6d97).("%s not allowed", Shipscxx . . $ Ships.[Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].ship_indexcxx . . $ player#ship_index.].namecxx . . $ ship#name.); |
| 9454 |
AddHUDMessagecxx . . $ AddHUDMessage(f90d95ab21fd6d97).("Switching to %s", Shipscxx . . $ Ships.[ship_index].namecxx . . $ ship#name.); |
| 9455 |
|
| 9456 |
PlayerChangeShipcxx . . $ PlayerChangeShip(3e454b8ccf442868).(Player_numcxx . . $ Player_num., ship_index); |
| 9457 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server told us to switch ships to the %s\n", (char *)data + count); |
| 9458 |
|
| 9459 |
FreeCockpitcxx . . $ FreeCockpit(49f6e7a06ebc5aa8).(); |
| 9460 |
CloseShipHUDcxx . . $ CloseShipHUD(49f6e7a06ebc5aa8).(); |
| 9461 |
|
| 9462 |
// ObjInitTypeSpecific(Player_object,0); //reset physics, model, etc. |
| 9463 |
InitShipHUDcxx . . $ InitShipHUD(d4f767463ce0a6b3).(Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].ship_indexcxx . . $ player#ship_index.); |
| 9464 |
InitCockpitcxx . . $ InitCockpit(d4f767463ce0a6b3).(Playerscxx . . $ Players.[Player_numcxx . . $ Player_num.].ship_indexcxx . . $ player#ship_index.); |
| 9465 |
|
| 9466 |
if (GetHUDModecxx . . $ GetHUDMode(d2d05048dda10524).() == HUD_COCKPITcxx . . $ HUD_COCKPIT.) |
| 9467 |
SetHUDModecxx . . $ SetHUDMode(1efe68d6753032ab).(HUD_COCKPITcxx . . $ HUD_COCKPIT.); |
| 9468 |
else if (GetHUDModecxx . . $ GetHUDMode(d2d05048dda10524).() == HUD_FULLSCREENcxx . . $ HUD_FULLSCREEN.) |
| 9469 |
SetHUDModecxx . . $ SetHUDMode(1efe68d6753032ab).(HUD_FULLSCREENcxx . . $ HUD_FULLSCREEN.); |
| 9470 |
} |
| 9471 |
|
| 9472 |
// If its been x seconds since we've sent a heartbeat, send another! |
| 9473 |
|
| 9474 |
#define HEARTBEAT_INTERVALcxx . . $ `Descent3/multi.cpp:9474:9`! 10.0f |
| 9475 |
void MultiSendHeartbeatcxx . . $ MultiSendHeartbeat(49f6e7a06ebc5aa8).() { |
| 9476 |
static float last_heartbeat = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 9477 |
|
| 9478 |
float time_scalar = 1; |
| 9479 |
|
| 9480 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 9481 |
time_scalar = .5; // Server sends out twice as fast |
| 9482 |
|
| 9483 |
if ((timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!() - last_heartbeat) > (HEARTBEAT_INTERVALcxx . . $ `Descent3/multi.cpp:9474:9`! * time_scalar)) { |
| 9484 |
uint8_tcxx . . $ uint8_t# outdata[100]; |
| 9485 |
int count = 0; |
| 9486 |
int size; |
| 9487 |
|
| 9488 |
size = START_DATAcxx . . $ START_DATA(8c36ee1faa9e0a0b).(MP_HEARTBEATcxx . . $ `Descent3/multi.h:644:9`!, outdata, &count); |
| 9489 |
END_DATAcxx . . $ END_DATA(dde21517a502ab05).(count, outdata, size); |
| 9490 |
|
| 9491 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 9492 |
|
| 9493 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Server sending heartbeat.\n"); |
| 9494 |
MultiSendToAllExceptcxx . . $ MultiSendToAllExcept(34ee600be5240935).(Player_numcxx . . $ Player_num., outdata, count, -1); |
| 9495 |
} else { |
| 9496 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Client sending heartbeat.\n"); |
| 9497 |
nw_Sendcxx . . $ nw_Send(102d2f582237fe86).(&Netgamecxx . . $ Netgame..server_addresscxx . . $ netgame_info#server_address., outdata, count, 0); |
| 9498 |
} |
| 9499 |
|
| 9500 |
// Reset interval |
| 9501 |
last_heartbeat = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 9502 |
} |
| 9503 |
} |
| 9504 |
|
| 9505 |
//----------------------------------------------- |
| 9506 |
void MultiDoMSafeFunctioncxx . . $ MultiDoMSafeFunction(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data); |
| 9507 |
void MultiDoMSafePowerupcxx . . $ MultiDoMSafePowerup(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data); |
| 9508 |
|
| 9509 |
// This allows us to specify under what sequences certain packets are accepted |
| 9510 |
#define ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(s, e) \ |
| 9511 |
{ \ |
| 9512 |
if (sequence < s || sequence > e) \ |
| 9513 |
return; \ |
| 9514 |
} |
| 9515 |
// #define ACCEPT_CONDITION(s,e) |
| 9516 |
|
| 9517 |
// Takes the individual packet types and passes their data to the appropriate routines |
| 9518 |
void MultiProcessDatacxx . . $ MultiProcessData(cddf7a04399840ab).(uint8_tcxx . . $ uint8_t# *data, int len, int slot, network_addresscxx . . $ network_address# *from_addr) { |
| 9519 |
uint8_tcxx . . $ uint8_t# type = data[0]; |
| 9520 |
len = len; |
| 9521 |
int sequence = -1; |
| 9522 |
|
| 9523 |
// HEY!!!!! These packets are the only ones that are accepted by non-connected machines |
| 9524 |
// (ie people on the netgame join screen) |
| 9525 |
// This will go away once I fill out all the ACCEPT_CONDITION types |
| 9526 |
if (!(NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].flagscxx . . $ netplayer#flags. & NPF_CONNECTEDcxx . . $ `Descent3/multi_external.h:165:9`!)) { |
| 9527 |
if (type != MP_CONNECTION_ACCEPTEDcxx . . $ `Descent3/multi.h:523:9`! && type != MP_JOIN_RESPONSEcxx . . $ `Descent3/multi.h:535:9`! && type != MP_GAME_INFOcxx . . $ `Descent3/multi.h:553:9`! && |
| 9528 |
type != MP_PLAYERLIST_DATAcxx . . $ `Descent3/multi.h:640:9`! && type != MP_ASK_FOR_URLcxx . . $ `Descent3/multi.h:621:9`! && type != MP_CUR_MSN_URLScxx . . $ `Descent3/multi.h:622:9`!) |
| 9529 |
return; |
| 9530 |
} else { |
| 9531 |
// Setup our sequences for accept conditions |
| 9532 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 9533 |
if (NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence. != NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!) |
| 9534 |
return; |
| 9535 |
if (slot == -1) |
| 9536 |
sequence = -1; |
| 9537 |
else |
| 9538 |
sequence = NetPlayerscxx . . $ NetPlayers.[slot].sequencecxx . . $ netplayer#sequence.; |
| 9539 |
} else { |
| 9540 |
sequence = NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].sequencecxx . . $ netplayer#sequence.; |
| 9541 |
} |
| 9542 |
} |
| 9543 |
|
| 9544 |
#ifndef RELEASE |
| 9545 |
Multi_packet_trackingcxx . . $ Multi_packet_tracking.[type]++; |
| 9546 |
#endif |
| 9547 |
|
| 9548 |
switch (type) { |
| 9549 |
case MP_CONNECTION_ACCEPTEDcxx . . $ `Descent3/multi.h:523:9`!: |
| 9550 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9551 |
MultiDoConnectionAcceptedcxx . . $ MultiDoConnectionAccepted(f25546b61a629de7).(data); |
| 9552 |
break; |
| 9553 |
case MP_REQUEST_PLAYERScxx . . $ `Descent3/multi.h:528:9`!: |
| 9554 |
MultiDoRequestPlayerscxx . . $ MultiDoRequestPlayers(f25546b61a629de7).(data); |
| 9555 |
break; |
| 9556 |
case MP_REQUEST_BUILDINGScxx . . $ `Descent3/multi.h:540:9`!: |
| 9557 |
MultiDoRequestBuildingscxx . . $ MultiDoRequestBuildings(f25546b61a629de7).(data); |
| 9558 |
break; |
| 9559 |
case MP_REQUEST_OBJECTScxx . . $ `Descent3/multi.h:543:9`!: |
| 9560 |
MultiDoRequestObjectscxx . . $ MultiDoRequestObjects(f25546b61a629de7).(data); |
| 9561 |
break; |
| 9562 |
case MP_REQUEST_WORLD_STATEScxx . . $ `Descent3/multi.h:609:9`!: |
| 9563 |
MultiDoRequestWorldStatescxx . . $ MultiDoRequestWorldStates(f25546b61a629de7).(data); |
| 9564 |
break; |
| 9565 |
case MP_PLAYER_POScxx . . $ `Descent3/multi.h:527:9`!: |
| 9566 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9567 |
NetPlayerscxx . . $ NetPlayers.[Player_numcxx . . $ Player_num.].total_bytes_rcvdcxx . . $ netplayer#total_bytes_rcvd. += len; |
| 9568 |
MultiDoPlayerPoscxx . . $ MultiDoPlayerPos(f25546b61a629de7).(data); |
| 9569 |
break; |
| 9570 |
case MP_DONE_PLAYERScxx . . $ `Descent3/multi.h:530:9`!: |
| 9571 |
MultiDoDonePlayerscxx . . $ MultiDoDonePlayers(f25546b61a629de7).(data); |
| 9572 |
break; |
| 9573 |
case MP_DONE_BUILDINGScxx . . $ `Descent3/multi.h:539:9`!: |
| 9574 |
MultiDoDoneBuildingscxx . . $ MultiDoDoneBuildings(f25546b61a629de7).(data); |
| 9575 |
break; |
| 9576 |
case MP_DONE_OBJECTScxx . . $ `Descent3/multi.h:542:9`!: |
| 9577 |
MultiDoDoneObjectscxx . . $ MultiDoDoneObjects(f25546b61a629de7).(data); |
| 9578 |
break; |
| 9579 |
case MP_DONE_WORLD_STATEScxx . . $ `Descent3/multi.h:610:9`!: |
| 9580 |
MultiDoDoneWorldStatescxx . . $ MultiDoDoneWorldStates(f25546b61a629de7).(data); |
| 9581 |
break; |
| 9582 |
case MP_ENTERING_GAMEcxx . . $ `Descent3/multi.h:531:9`!: |
| 9583 |
MultiDoEnteringGamecxx . . $ MultiDoEnteringGame(f25546b61a629de7).(data); |
| 9584 |
break; |
| 9585 |
case MP_PLAYERcxx . . $ `Descent3/multi.h:525:9`!: |
| 9586 |
MultiDoPlayercxx . . $ MultiDoPlayer(f25546b61a629de7).(data); |
| 9587 |
break; |
| 9588 |
case MP_BUILDINGcxx . . $ `Descent3/multi.h:541:9`!: |
| 9589 |
MultiDoBuildingcxx . . $ MultiDoBuilding(f25546b61a629de7).(data); |
| 9590 |
break; |
| 9591 |
case MP_WORLD_STATEScxx . . $ `Descent3/multi.h:611:9`!: |
| 9592 |
MultiDoWorldStatescxx . . $ MultiDoWorldStates(f25546b61a629de7).(data); |
| 9593 |
break; |
| 9594 |
case MP_JOIN_OBJECTScxx . . $ `Descent3/multi.h:544:9`!: |
| 9595 |
MultiDoJoinObjectscxx . . $ MultiDoJoinObjects(f25546b61a629de7).(data); |
| 9596 |
break; |
| 9597 |
case MP_SEND_DEMO_OBJECT_FLAGScxx . . $ `Descent3/multi.h:634:9`!: |
| 9598 |
MultiDoJoinDemoObjectscxx . . $ MultiDoJoinDemoObjects(f25546b61a629de7).(data); |
| 9599 |
break; |
| 9600 |
case MP_MY_INFOcxx . . $ `Descent3/multi.h:529:9`!: |
| 9601 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_LEVEL_STARTcxx . . $ `Descent3/multi_external.h:150:9`!, NETSEQ_LEVEL_STARTcxx . . $ `Descent3/multi_external.h:150:9`!); |
| 9602 |
MultiDoMyInfocxx . . $ MultiDoMyInfo(f25546b61a629de7).(data); |
| 9603 |
break; |
| 9604 |
case MP_DISCONNECTcxx . . $ `Descent3/multi.h:532:9`!: |
| 9605 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, 255); |
| 9606 |
MultiDoDisconnectcxx . . $ MultiDoDisconnect(f25546b61a629de7).(data); |
| 9607 |
break; |
| 9608 |
case MP_PLAYER_FIREcxx . . $ `Descent3/multi.h:533:9`!: |
| 9609 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9610 |
MultiDoFirePlayerWBcxx . . $ MultiDoFirePlayerWB(f25546b61a629de7).(data); |
| 9611 |
break; |
| 9612 |
case MP_ASK_TO_JOINcxx . . $ `Descent3/multi.h:534:9`!: |
| 9613 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9614 |
MultiDoAskToJoincxx . . $ MultiDoAskToJoin(b4ed6bda213be74).(data, from_addr); |
| 9615 |
break; |
| 9616 |
case MP_JOIN_RESPONSEcxx . . $ `Descent3/multi.h:535:9`!: |
| 9617 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9618 |
MultiDoJoinResponsecxx . . $ MultiDoJoinResponse(f25546b61a629de7).(data); |
| 9619 |
break; |
| 9620 |
case MP_SERVER_QUITcxx . . $ `Descent3/multi.h:536:9`!: |
| 9621 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_WAITING_FOR_LEVELcxx . . $ `Descent3/multi_external.h:149:9`!, 255); |
| 9622 |
MultiDoServerQuitcxx . . $ MultiDoServerQuit(f25546b61a629de7).(data); |
| 9623 |
break; |
| 9624 |
case MP_LEAVE_GAMEcxx . . $ `Descent3/multi.h:537:9`!: |
| 9625 |
MultiDoLeaveGamecxx . . $ MultiDoLeaveGame(f25546b61a629de7).(data); |
| 9626 |
break; |
| 9627 |
case MP_BLOWUP_BUILDINGcxx . . $ `Descent3/multi.h:538:9`!: |
| 9628 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_REQUEST_OBJECTScxx . . $ `Descent3/multi_external.h:157:9`!, 255); |
| 9629 |
MultiDoBlowupBuildingcxx . . $ MultiDoBlowupBuilding(f25546b61a629de7).(data); |
| 9630 |
break; |
| 9631 |
case MP_PLAYER_DEADcxx . . $ `Descent3/multi.h:545:9`!: |
| 9632 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9633 |
MultiDoPlayerDeadcxx . . $ MultiDoPlayerDead(f25546b61a629de7).(data); |
| 9634 |
break; |
| 9635 |
case MP_PLAYER_ENTERED_GAMEcxx . . $ `Descent3/multi.h:547:9`!: |
| 9636 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_REQUEST_BUILDINGScxx . . $ `Descent3/multi_external.h:155:9`!, 255); |
| 9637 |
MultiDoPlayerEnteredGamecxx . . $ MultiDoPlayerEnteredGame(f25546b61a629de7).(data); |
| 9638 |
break; |
| 9639 |
case MP_DAMAGE_PLAYERcxx . . $ `Descent3/multi.h:548:9`!: |
| 9640 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9641 |
MultiDoDamagePlayercxx . . $ MultiDoDamagePlayer(f25546b61a629de7).(data); |
| 9642 |
break; |
| 9643 |
case MP_MESSAGE_FROM_SERVERcxx . . $ `Descent3/multi.h:549:9`!: |
| 9644 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9645 |
MultiDoMessageFromServercxx . . $ MultiDoMessageFromServer(f25546b61a629de7).(data); |
| 9646 |
break; |
| 9647 |
case MP_MESSAGE_TO_SERVERcxx . . $ `Descent3/multi.h:555:9`!: |
| 9648 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9649 |
MultiDoMessageToServercxx . . $ MultiDoMessageToServer(f25546b61a629de7).(data); |
| 9650 |
break; |
| 9651 |
case MP_END_PLAYER_DEATHcxx . . $ `Descent3/multi.h:550:9`!: |
| 9652 |
MultiDoEndPlayerDeathcxx . . $ MultiDoEndPlayerDeath(f25546b61a629de7).(data); |
| 9653 |
break; |
| 9654 |
case MP_RENEW_PLAYERcxx . . $ `Descent3/multi.h:551:9`!: |
| 9655 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYERScxx . . $ `Descent3/multi_external.h:154:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9656 |
MultiDoRenewPlayercxx . . $ MultiDoRenewPlayer(f25546b61a629de7).(data); |
| 9657 |
break; |
| 9658 |
case MP_GET_GAME_INFOcxx . . $ `Descent3/multi.h:552:9`!: |
| 9659 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9660 |
MultiDoGetGameInfocxx . . $ MultiDoGetGameInfo(b4ed6bda213be74).(data, from_addr); |
| 9661 |
break; |
| 9662 |
case MP_GET_PXO_GAME_INFOcxx . . $ `Descent3/multi.h:563:9`!: |
| 9663 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9664 |
MultiDoGetPXOGameInfocxx . . $ MultiDoGetPXOGameInfo(b4ed6bda213be74).(data, from_addr); |
| 9665 |
break; |
| 9666 |
case MP_GAME_INFOcxx . . $ `Descent3/multi.h:553:9`!: |
| 9667 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9668 |
MultiDoGameInfocxx . . $ MultiDoGameInfo(b4ed6bda213be74).(data, from_addr); |
| 9669 |
break; |
| 9670 |
case MP_OBJECTcxx . . $ `Descent3/multi.h:524:9`!: |
| 9671 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9672 |
MultiDoObjectcxx . . $ MultiDoObject(f25546b61a629de7).(data); |
| 9673 |
break; |
| 9674 |
case MP_SPECIAL_PACKETcxx . . $ `Descent3/multi.h:556:9`!: |
| 9675 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9676 |
MultiDoSpecialPacketcxx . . $ MultiDoSpecialPacket(f25546b61a629de7).(data); |
| 9677 |
break; |
| 9678 |
case MP_EXECUTE_DLLcxx . . $ `Descent3/multi.h:557:9`!: |
| 9679 |
MultiDoExecuteDLLcxx . . $ MultiDoExecuteDLL(f25546b61a629de7).(data); |
| 9680 |
break; |
| 9681 |
case MP_REMOVE_OBJECTcxx . . $ `Descent3/multi.h:558:9`!: |
| 9682 |
MultiDoRemoveObjectcxx . . $ MultiDoRemoveObject(f25546b61a629de7).(data); |
| 9683 |
break; |
| 9684 |
case MP_GUIDED_INFOcxx . . $ `Descent3/multi.h:559:9`!: |
| 9685 |
MultiDoGuidedInfocxx . . $ MultiDoGuidedInfo(f25546b61a629de7).(data); |
| 9686 |
break; |
| 9687 |
case MP_LEVEL_INFOcxx . . $ `Descent3/multi.h:562:9`!: |
| 9688 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_WAITING_FOR_LEVELcxx . . $ `Descent3/multi_external.h:149:9`!, NETSEQ_WAITING_FOR_LEVELcxx . . $ `Descent3/multi_external.h:149:9`!); |
| 9689 |
MultiDoLevelInfocxx . . $ MultiDoLevelInfo(f25546b61a629de7).(data); |
| 9690 |
break; |
| 9691 |
case MP_READY_FOR_LEVELcxx . . $ `Descent3/multi.h:561:9`!: |
| 9692 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_WAITING_FOR_LEVELcxx . . $ `Descent3/multi_external.h:149:9`!, NETSEQ_WAITING_FOR_LEVELcxx . . $ `Descent3/multi_external.h:149:9`!); |
| 9693 |
MultiDoReadyForLevelcxx . . $ MultiDoReadyForLevel(f25546b61a629de7).(data); |
| 9694 |
break; |
| 9695 |
case MP_LEVEL_ENDEDcxx . . $ `Descent3/multi.h:560:9`!: |
| 9696 |
MultiDoLevelEndedcxx . . $ MultiDoLevelEnded(f25546b61a629de7).(data); |
| 9697 |
break; |
| 9698 |
case MP_GET_GAMETIMEcxx . . $ `Descent3/multi.h:565:9`!: |
| 9699 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_NEED_GAMETIMEcxx . . $ `Descent3/multi_external.h:151:9`!, NETSEQ_NEED_GAMETIMEcxx . . $ `Descent3/multi_external.h:151:9`!); |
| 9700 |
MultiDoGameTimeReqcxx . . $ MultiDoGameTimeReq(b4ed6bda213be74).(data, from_addr); |
| 9701 |
break; |
| 9702 |
case MP_HERE_IS_GAMETIMEcxx . . $ `Descent3/multi.h:566:9`!: |
| 9703 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_NEED_GAMETIMEcxx . . $ `Descent3/multi_external.h:151:9`!, NETSEQ_WAIT_GAMETIMEcxx . . $ `Descent3/multi_external.h:152:9`!); |
| 9704 |
MultiDoSetGameTimecxx . . $ MultiDoSetGameTime(f25546b61a629de7).(data); |
| 9705 |
break; |
| 9706 |
case MP_POWERUP_REPOSITIONcxx . . $ `Descent3/multi.h:564:9`!: |
| 9707 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_OBJECTScxx . . $ `Descent3/multi_external.h:158:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9708 |
MultiDoPowerupRepositioncxx . . $ MultiDoPowerupReposition(f25546b61a629de7).(data); |
| 9709 |
break; |
| 9710 |
case MP_ROBOT_POScxx . . $ `Descent3/multi.h:567:9`!: |
| 9711 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9712 |
MultiDoRobotPoscxx . . $ MultiDoRobotPos(f25546b61a629de7).(data); |
| 9713 |
break; |
| 9714 |
case MP_ROBOT_FIREcxx . . $ `Descent3/multi.h:568:9`!: |
| 9715 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9716 |
MultiDoRobotFirecxx . . $ MultiDoRobotFire(f25546b61a629de7).(data); |
| 9717 |
break; |
| 9718 |
case MP_ON_OFFcxx . . $ `Descent3/multi.h:571:9`!: |
| 9719 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9720 |
MultiDoOnOffcxx . . $ MultiDoOnOff(f25546b61a629de7).(data); |
| 9721 |
break; |
| 9722 |
case MP_ROBOT_DAMAGEcxx . . $ `Descent3/multi.h:569:9`!: |
| 9723 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9724 |
MultiDoRobotDamagecxx . . $ MultiDoRobotDamage(f25546b61a629de7).(data); |
| 9725 |
break; |
| 9726 |
case MP_ROBOT_EXPLODEcxx . . $ `Descent3/multi.h:570:9`!: |
| 9727 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9728 |
MultiDoRobotExplodecxx . . $ MultiDoRobotExplode(f25546b61a629de7).(data); |
| 9729 |
break; |
| 9730 |
case MP_ADDITIONAL_DAMAGEcxx . . $ `Descent3/multi.h:572:9`!: |
| 9731 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9732 |
MultiDoAdditionalDamagecxx . . $ MultiDoAdditionalDamage(f25546b61a629de7).(data); |
| 9733 |
break; |
| 9734 |
case MP_ANIM_UPDATEcxx . . $ `Descent3/multi.h:573:9`!: |
| 9735 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9736 |
MultiDoObjAnimUpdatecxx . . $ MultiDoObjAnimUpdate(f25546b61a629de7).(data); |
| 9737 |
break; |
| 9738 |
case MP_PLAY_3D_SOUND_FROM_OBJcxx . . $ `Descent3/multi.h:576:9`!: |
| 9739 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9740 |
MultiDoPlay3dSoundcxx . . $ MultiDoPlay3dSound(f25546b61a629de7).(data); |
| 9741 |
break; |
| 9742 |
case MP_ROBOT_FIRE_SOUNDcxx . . $ `Descent3/multi.h:578:9`!: |
| 9743 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9744 |
MultiDoRobotFireSoundcxx . . $ MultiDoRobotFireSound(f25546b61a629de7).(data); |
| 9745 |
break; |
| 9746 |
case MP_TURRET_UPDATEcxx . . $ `Descent3/multi.h:580:9`!: |
| 9747 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9748 |
MultiDoTurretUpdatecxx . . $ MultiDoTurretUpdate(f25546b61a629de7).(data); |
| 9749 |
break; |
| 9750 |
case MP_CLIENT_USE_INVENTORY_ITEMcxx . . $ `Descent3/multi.h:581:9`!: |
| 9751 |
MultiDoClientInventoryUseItemcxx . . $ MultiDoClientInventoryUseItem(ea2b65c19bfee284).(slot, data); |
| 9752 |
break; |
| 9753 |
case MP_REMOVE_INVENTORY_ITEMcxx . . $ `Descent3/multi.h:583:9`!: |
| 9754 |
MultiDoClientInventoryRemoveItemcxx . . $ MultiDoClientInventoryRemoveItem(ea2b65c19bfee284).(slot, data); |
| 9755 |
break; |
| 9756 |
case MP_REQUEST_COUNTERMEASUREcxx . . $ `Descent3/multi.h:574:9`!: |
| 9757 |
MultiDoRequestCountermeasurecxx . . $ MultiDoRequestCountermeasure(f25546b61a629de7).(data); |
| 9758 |
break; |
| 9759 |
case MP_SERVER_SENT_COUNTcxx . . $ `Descent3/multi.h:584:9`!: |
| 9760 |
MultiDoBytesSentcxx . . $ MultiDoBytesSent(f25546b61a629de7).(data); |
| 9761 |
break; |
| 9762 |
case MP_CLIENT_SET_PPScxx . . $ `Descent3/multi.h:585:9`!: |
| 9763 |
MultiDoPPSSetcxx . . $ MultiDoPPSSet(fc0f0e1646c32816).(data, slot); |
| 9764 |
break; |
| 9765 |
case MP_GREETINGS_FROM_CLIENTcxx . . $ `Descent3/multi.h:586:9`!: |
| 9766 |
MultiDoGreetingscxx . . $ MultiDoGreetings(b4ed6bda213be74).(data, from_addr); |
| 9767 |
break; |
| 9768 |
case MP_REQUEST_TO_OBSERVEcxx . . $ `Descent3/multi.h:587:9`!: |
| 9769 |
MultiDoRequestToObservecxx . . $ MultiDoRequestToObserve(f25546b61a629de7).(data); |
| 9770 |
break; |
| 9771 |
case MP_OBSERVER_CHANGEcxx . . $ `Descent3/multi.h:588:9`!: |
| 9772 |
MultiDoObserverChangecxx . . $ MultiDoObserverChange(f25546b61a629de7).(data); |
| 9773 |
break; |
| 9774 |
case MP_VISIBLE_PLAYERScxx . . $ `Descent3/multi.h:589:9`!: |
| 9775 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9776 |
MultiDoVisiblePlayerscxx . . $ MultiDoVisiblePlayers(f25546b61a629de7).(data); |
| 9777 |
break; |
| 9778 |
case MP_FILE_REQcxx . . $ `Descent3/multi.h:590:9`!: |
| 9779 |
MultiDoFileReqcxx . . $ MultiDoFileReq(f25546b61a629de7).(data); |
| 9780 |
break; |
| 9781 |
case MP_FILE_DENIEDcxx . . $ `Descent3/multi.h:591:9`!: |
| 9782 |
MultiDoFileDeniedcxx . . $ MultiDoFileDenied(f25546b61a629de7).(data); |
| 9783 |
break; |
| 9784 |
case MP_FILE_DATAcxx . . $ `Descent3/multi.h:592:9`!: |
| 9785 |
MultiDoFileDatacxx . . $ MultiDoFileData(f25546b61a629de7).(data); |
| 9786 |
break; |
| 9787 |
case MP_FILE_ACKcxx . . $ `Descent3/multi.h:593:9`!: |
| 9788 |
MultiDoFileAckcxx . . $ MultiDoFileAck(f25546b61a629de7).(data); |
| 9789 |
break; |
| 9790 |
case MP_FILE_CANCELcxx . . $ `Descent3/multi.h:598:9`!: |
| 9791 |
MultiDoFileCancelledcxx . . $ MultiDoFileCancelled(f25546b61a629de7).(data); |
| 9792 |
break; |
| 9793 |
case MP_PLAYER_CUSTOM_DATAcxx . . $ `Descent3/multi.h:600:9`!: |
| 9794 |
MultiDoCustomPlayerDatacxx . . $ MultiDoCustomPlayerData(f25546b61a629de7).(data); |
| 9795 |
break; |
| 9796 |
case MP_GHOST_OBJECTcxx . . $ `Descent3/multi.h:603:9`!: |
| 9797 |
MultiDoGhostObjectcxx . . $ MultiDoGhostObject(f25546b61a629de7).(data); |
| 9798 |
break; |
| 9799 |
case MP_PLAYER_PINGcxx . . $ `Descent3/multi.h:604:9`!: |
| 9800 |
MultiDoPingcxx . . $ MultiDoPing(b4ed6bda213be74).(data, from_addr); |
| 9801 |
break; |
| 9802 |
case MP_PLAYER_PONGcxx . . $ `Descent3/multi.h:605:9`!: |
| 9803 |
MultiDoPongcxx . . $ MultiDoPong(f25546b61a629de7).(data); |
| 9804 |
break; |
| 9805 |
case MP_PLAYER_LAG_INFOcxx . . $ `Descent3/multi.h:606:9`!: |
| 9806 |
MultiDoLagInfocxx . . $ MultiDoLagInfo(f25546b61a629de7).(data); |
| 9807 |
break; |
| 9808 |
case MP_REQUEST_SHIELDScxx . . $ `Descent3/multi.h:608:9`!: |
| 9809 |
MultiDoRequestShieldscxx . . $ MultiDoRequestShields(f25546b61a629de7).(data); |
| 9810 |
break; |
| 9811 |
case MP_REQUEST_DAMAGEcxx . . $ `Descent3/multi.h:607:9`!: |
| 9812 |
MultiDoRequestDamagecxx . . $ MultiDoRequestDamage(f25546b61a629de7).(data); |
| 9813 |
break; |
| 9814 |
case MP_ATTACH_OBJcxx . . $ `Descent3/multi.h:612:9`!: |
| 9815 |
MultiDoAttachcxx . . $ MultiDoAttach(f25546b61a629de7).(data); |
| 9816 |
break; |
| 9817 |
case MP_UNATTACH_OBJcxx . . $ `Descent3/multi.h:613:9`!: |
| 9818 |
MultiDoUnattachcxx . . $ MultiDoUnattach(f25546b61a629de7).(data); |
| 9819 |
break; |
| 9820 |
case MP_AIWEAP_FLAGScxx . . $ `Descent3/multi.h:614:9`!: |
| 9821 |
MultiDoAiWeaponFlagscxx . . $ MultiDoAiWeaponFlags(f25546b61a629de7).(data); |
| 9822 |
break; |
| 9823 |
case MP_ATTACH_RAD_OBJcxx . . $ `Descent3/multi.h:615:9`!: |
| 9824 |
MultiDoAttachRadcxx . . $ MultiDoAttachRad(f25546b61a629de7).(data); |
| 9825 |
break; |
| 9826 |
case MP_TIMEOUT_WEAPONcxx . . $ `Descent3/multi.h:616:9`!: |
| 9827 |
MultiDoReleaseTimeoutMissilecxx . . $ MultiDoReleaseTimeoutMissile(f25546b61a629de7).(data); |
| 9828 |
break; |
| 9829 |
case MP_WEAPONS_LOADcxx . . $ `Descent3/multi.h:617:9`!: |
| 9830 |
MultiDoWeaponsLoadcxx . . $ MultiDoWeaponsLoad(f25546b61a629de7).(data); |
| 9831 |
break; |
| 9832 |
case MP_REQUEST_PEER_DAMAGEcxx . . $ `Descent3/multi.h:618:9`!: |
| 9833 |
MultiDoRequestPeerDamagecxx . . $ MultiDoRequestPeerDamage(b4ed6bda213be74).(data, from_addr); |
| 9834 |
break; |
| 9835 |
case MP_MSAFE_FUNCTIONcxx . . $ `Descent3/multi.h:619:9`!: |
| 9836 |
MultiDoMSafeFunctioncxx . . $ MultiDoMSafeFunction(f25546b61a629de7).(data); |
| 9837 |
break; |
| 9838 |
case MP_MSAFE_POWERUPcxx . . $ `Descent3/multi.h:620:9`!: |
| 9839 |
MultiDoMSafePowerupcxx . . $ MultiDoMSafePowerup(f25546b61a629de7).(data); |
| 9840 |
break; |
| 9841 |
case MP_ASK_FOR_URLcxx . . $ `Descent3/multi.h:621:9`!: |
| 9842 |
msn_DoAskForURLcxx . . $ msn_DoAskForURL(b4ed6bda213be74).(data, from_addr); |
| 9843 |
break; |
| 9844 |
case MP_CUR_MSN_URLScxx . . $ `Descent3/multi.h:622:9`!: |
| 9845 |
msn_DoCurrMsnURLscxx . . $ msn_DoCurrMsnURLs(b4ed6bda213be74).(data, from_addr); |
| 9846 |
break; |
| 9847 |
case MP_REQUEST_TO_FIREcxx . . $ `Descent3/multi.h:623:9`!: |
| 9848 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9849 |
MultiDoRequestToFirecxx . . $ MultiDoRequestToFire(f25546b61a629de7).(data); |
| 9850 |
break; |
| 9851 |
case MP_PERMISSION_TO_FIREcxx . . $ `Descent3/multi.h:624:9`!: |
| 9852 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9853 |
MultiDoPermissionToFirecxx . . $ MultiDoPermissionToFire(f25546b61a629de7).(data); |
| 9854 |
break; |
| 9855 |
case MP_CONNECT_BAILcxx . . $ `Descent3/multi.h:625:9`!: |
| 9856 |
MultiDoConnectBailcxx . . $ MultiDoConnectBail(49f6e7a06ebc5aa8).(); |
| 9857 |
break; |
| 9858 |
case MP_CLIENT_PLAY_TAUNTcxx . . $ `Descent3/multi.h:626:9`!: |
| 9859 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9860 |
MultiDoRequestPlayTauntcxx . . $ MultiDoRequestPlayTaunt(f25546b61a629de7).(data); |
| 9861 |
break; |
| 9862 |
case MP_SERVER_PLAY_TAUNTcxx . . $ `Descent3/multi.h:627:9`!: |
| 9863 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9864 |
MultiDoPlayTauntcxx . . $ MultiDoPlayTaunt(f25546b61a629de7).(data); |
| 9865 |
break; |
| 9866 |
case MP_REQUEST_MARKERcxx . . $ `Descent3/multi.h:628:9`!: |
| 9867 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9868 |
MultiDoRequestMarkercxx . . $ MultiDoRequestMarker(f25546b61a629de7).(data); |
| 9869 |
break; |
| 9870 |
case MP_REQUEST_TYPE_ICONcxx . . $ `Descent3/multi.h:629:9`!: |
| 9871 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9872 |
MultiDoRequestTypeIconcxx . . $ MultiDoRequestTypeIcon(f25546b61a629de7).(data); |
| 9873 |
break; |
| 9874 |
case MP_SEND_TYPE_ICONcxx . . $ `Descent3/multi.h:630:9`!: |
| 9875 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9876 |
MultiDoTypeIconcxx . . $ MultiDoTypeIcon(f25546b61a629de7).(data); |
| 9877 |
break; |
| 9878 |
case MP_REQUEST_TO_MOVEcxx . . $ `Descent3/multi.h:631:9`!: |
| 9879 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9880 |
MultiDoRequestToMovecxx . . $ MultiDoRequestToMove(f25546b61a629de7).(data); |
| 9881 |
break; |
| 9882 |
case MP_ADJUST_POSITIONcxx . . $ `Descent3/multi.h:632:9`!: |
| 9883 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9884 |
MultiDoAdjustPositioncxx . . $ MultiDoAdjustPosition(f25546b61a629de7).(data); |
| 9885 |
break; |
| 9886 |
case MP_GENERIC_NONVIScxx . . $ `Descent3/multi.h:633:9`!: |
| 9887 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9888 |
MultiDoGenericNonViscxx . . $ MultiDoGenericNonVis(f25546b61a629de7).(data); |
| 9889 |
break; |
| 9890 |
case MP_GUIDEBOTMENU_REQUESTcxx . . $ `Descent3/multi.h:635:9`!: |
| 9891 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9892 |
MultiDoGuidebotMenuRequestcxx . . $ MultiDoGuidebotMenuRequest(fc0f0e1646c32816).(data, slot); |
| 9893 |
break; |
| 9894 |
case MP_GUIDEBOTMENU_DATAcxx . . $ `Descent3/multi.h:636:9`!: |
| 9895 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9896 |
MultiDoGuidebotMenuDatacxx . . $ MultiDoGuidebotMenuData(f25546b61a629de7).(data); |
| 9897 |
break; |
| 9898 |
case MP_BREAK_GLASScxx . . $ `Descent3/multi.h:637:9`!: |
| 9899 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9900 |
MultiDoBreakGlasscxx . . $ MultiDoBreakGlass(f25546b61a629de7).(data); |
| 9901 |
break; |
| 9902 |
case MP_THIEF_STEALcxx . . $ `Descent3/multi.h:638:9`!: |
| 9903 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9904 |
MultiDoThiefStealcxx . . $ MultiDoThiefSteal(f25546b61a629de7).(data); |
| 9905 |
break; |
| 9906 |
case MP_REQUEST_PLAYERLISTcxx . . $ `Descent3/multi.h:639:9`!: |
| 9907 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9908 |
DoReqPlayerListcxx . . $ DoReqPlayerList(f2758234d0c8cb80).(from_addr); |
| 9909 |
break; |
| 9910 |
case MP_PLAYERLIST_DATAcxx . . $ `Descent3/multi.h:640:9`!: |
| 9911 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9912 |
DoPlayerListDatacxx . . $ DoPlayerListData(fc0f0e1646c32816).(data, len); |
| 9913 |
break; |
| 9914 |
case MP_SERVER_AUDIOTAUNT_TIMEcxx . . $ `Descent3/multi.h:641:9`!: |
| 9915 |
MultiDoAudioTauntTimecxx . . $ MultiDoAudioTauntTime(f25546b61a629de7).(data); |
| 9916 |
break; |
| 9917 |
case MP_CHANGE_RANKcxx . . $ `Descent3/multi.h:642:9`!: |
| 9918 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9919 |
MultiDoChangeRankcxx . . $ MultiDoChangeRank(f25546b61a629de7).(data); |
| 9920 |
break; |
| 9921 |
case MP_BASHPLAYER_SHIPcxx . . $ `Descent3/multi.h:643:9`!: |
| 9922 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_LEVEL_STARTcxx . . $ `Descent3/multi_external.h:150:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9923 |
MultiDoBashPlayerShipcxx . . $ MultiDoBashPlayerShip(f25546b61a629de7).(data); |
| 9924 |
break; |
| 9925 |
case MP_HEARTBEATcxx . . $ `Descent3/multi.h:644:9`!: |
| 9926 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 9927 |
Got_heartbeatcxx . . $ Got_heartbeat. = true; |
| 9928 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got heartbeat from server.\n"); |
| 9929 |
} else |
| 9930 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got heartbeat from slot %d.\n", slot); |
| 9931 |
break; |
| 9932 |
case MP_INITIAL_RANKcxx . . $ `Descent3/multi.h:645:9`!: |
| 9933 |
MultiDoInitialRankcxx . . $ MultiDoInitialRank(f25546b61a629de7).(data); |
| 9934 |
break; |
| 9935 |
case MP_MISSILE_RELEASEcxx . . $ `Descent3/multi.h:646:9`!: |
| 9936 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9937 |
MultiDoMissileReleasecxx . . $ MultiDoMissileRelease(ea2b65c19bfee284).(slot, data); |
| 9938 |
break; |
| 9939 |
case MP_STRIP_PLAYERcxx . . $ `Descent3/multi.h:647:9`!: |
| 9940 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!, NETSEQ_PLAYINGcxx . . $ `Descent3/multi_external.h:161:9`!); |
| 9941 |
MultiDoStripPlayercxx . . $ MultiDoStripPlayer(ea2b65c19bfee284).(slot, data); |
| 9942 |
break; |
| 9943 |
case MP_REJECTED_CHECKSUMcxx . . $ `Descent3/multi.h:648:9`!: |
| 9944 |
ACCEPT_CONDITIONcxx . . $ `Descent3/multi.cpp:9510:9`!(-1, -1); |
| 9945 |
MultiDoServerRejectedChecksumcxx . . $ MultiDoServerRejectedChecksum(f25546b61a629de7).(data); |
| 9946 |
default: |
| 9947 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Invalid packet type %d!\n", type); |
| 9948 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); // Invalid packet type!!!! |
| 9949 |
break; |
| 9950 |
} |
| 9951 |
} |
| 9952 |
|
| 9953 |
// Takes a bunch of messages, check them for validity, |
| 9954 |
// and pass them to multi_process_data. |
| 9955 |
void MultiProcessBigDatacxx . . $ MultiProcessBigData(c3263a6d42f31e8c).(uint8_tcxx . . $ uint8_t# *buf, int len, network_addresscxx . . $ network_address# *from_addr) { |
| 9956 |
int type, bytes_processed = 0; |
| 9957 |
int16_t sub_len; |
| 9958 |
int slot = 0; |
| 9959 |
int last_type = -1, last_len = -1; |
| 9960 |
|
| 9961 |
// Update timer stuff so we don't disconnect due to timeout |
| 9962 |
if (Netgamecxx . . $ Netgame..local_rolecxx . . $ netgame_info#local_role. == LR_CLIENTcxx . . $ `Descent3/multi_external.h:128:9`!) { |
| 9963 |
Netgamecxx . . $ Netgame..last_server_timecxx . . $ netgame_info#last_server_time. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 9964 |
} else { |
| 9965 |
slot = MultiMatchPlayerToAddresscxx . . $ MultiMatchPlayerToAddress(974bd2fc5f961852).(from_addr); |
| 9966 |
if (slot >= 0) { |
| 9967 |
// This is to prevent clients who have disconnected on the client side |
| 9968 |
// but not the server side from being credited with a recent packet |
| 9969 |
// just because they are looking for a game |
| 9970 |
if ((buf[0] != MP_GET_PXO_GAME_INFOcxx . . $ `Descent3/multi.h:563:9`!) && (buf[0] != MP_GET_GAME_INFOcxx . . $ `Descent3/multi.h:552:9`!)) { |
| 9971 |
NetPlayerscxx . . $ NetPlayers.[slot].last_packet_timecxx . . $ netplayer#last_packet_time. = timer_GetTimecxx . . $ `ddio/ddio.h:236:9`!(); |
| 9972 |
} else { |
| 9973 |
// Someone who we think is still connected is looking for game info! |
| 9974 |
// We aren't going to process this packet because otherwise they |
| 9975 |
// might try to join which wouldn't work and they would be credited |
| 9976 |
// with sending a packet and the server wouldn't disconnect them. |
| 9977 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Ignoring game info request from a currently connected user (%s)\n", Players[slot].callsign); |
| 9978 |
return; |
| 9979 |
} |
| 9980 |
} |
| 9981 |
} |
| 9982 |
|
| 9983 |
while (bytes_processed < len) { |
| 9984 |
type = buf[bytes_processed]; |
| 9985 |
sub_len = INTEL_SHORTcxx . . $ `lib/byteswap.h:108:9`!((*(int16_t *)(buf + bytes_processed + 1))); |
| 9986 |
|
| 9987 |
if (sub_len < 3 || type == 0 || (len - bytes_processed) < 2) { |
| 9988 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(0, "Got a corrupted packet!\n"); |
| 9989 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 9990 |
return; // just throw the rest out |
| 9991 |
} |
| 9992 |
|
| 9993 |
if ((bytes_processed + sub_len) > len) { |
| 9994 |
mprintfcxx . . $ `ddebug/mono.h:82:9`!(1, "multi_process_bigdata: packet type %d too int16_t (%d>%d)!\n", type, (bytes_processed + sub_len), len); |
| 9995 |
Int3cxx . . $ `misc/pserror.h:247:9`!(); |
| 9996 |
return; |
| 9997 |
} |
| 9998 |
|
| 9999 |
MultiProcessDatacxx . . $ MultiProcessData(cddf7a04399840ab).(&buf[bytes_processed], sub_len, slot, from_addr); |
| 10000 |
bytes_processed += sub_len; |
| 10001 |
last_type = type; |
| 10002 |
last_len = sub_len; |
| 10003 |
} |
| 10004 |
} |