📄 player.cpp
字号:
//-----------------------------------------------------------------------------
//
// $Logfile:: /Quake 2 Engine/Sin/code/game/player.cpp $
// $Revision:: 422 $
// $Author:: Jimdose $
// $Date:: 2/16/99 8:38p $
//
// Copyright (C) 1997 by Ritual Entertainment, Inc.
// All rights reserved.
//
// This source is may not be distributed and/or modified without
// expressly written permission by Ritual Entertainment, Inc.
//
// $Log:: /Quake 2 Engine/Sin/code/game/player.cpp $
//
// 422 2/16/99 8:38p Jimdose
// moved sin arcade comm stuff to client
//
// 421 1/29/99 6:14p Jimdose
// added 2015 changes
//
// 420 1/27/99 5:15p Jimdose
// Fixed no weapon bug in arcade mode deathmatch
//
// 419 12/18/98 11:03p Jimdose
// removed include of qcommon.h
//
// 418 12/16/98 5:42p Jimdose
// fixed a bunch of respawn issues for Sin Arcade
//
// 417 12/16/98 12:41a Jimdose
// Killed no longer deletes player's weapon in training mode 2 (arcade)
//
// 416 12/14/98 8:17p Aldie
// Took out #if 0
//
// 415 12/14/98 8:07p Aldie
// Temporarily remove arcade stuff
//
// 414 12/14/98 6:53p Aldie
// Added some stuff for arcade when death occurs
//
// 413 12/14/98 6:03p Jimdose
// made GodCheat allow a value to set it on of off
//
// 412 11/18/98 3:47a Aldie
// Fix for mutants and inventory items showing up in inventory
//
// 411 11/18/98 3:02a Jimdose
// made mutant mode stay across levels
//
// 410 11/17/98 6:54p Aldie
// Don't do spawn particles for training
//
// 409 11/17/98 3:48a Jimdose
// gravpaths no longer pull you during waterjumps
//
// 408 11/16/98 9:05p Markd
// don't do flash blend if hit by MOD_FISTS
//
// 407 11/16/98 8:29p Jimdose
// added CheckWater
//
// 406 11/16/98 7:45p Markd
// made take, only take a certain amount
//
// 405 11/16/98 4:37a Markd
// don't set angles if player is frozen
//
// 404 11/16/98 12:42a Aldie
// spidermine camera
//
// 403 11/15/98 8:43p Markd
// Fixed third person crosshair issues and gravity axis and zooming
//
// 402 11/15/98 3:55a Markd
// fixed weapon visible in vehicles
//
// 401 11/14/98 7:57p Markd
// always reload when pressing use
//
// 400 11/14/98 2:52a Markd
// put in RF_DONTDRAW support on weapons
//
// 399 11/14/98 2:54a Aldie
// Added InitSkin to preserve custom skins in single player
//
// 398 11/13/98 11:02p Jimdose
// made fov persistant across levels and after zooming in and out
//
// 397 11/13/98 10:42p Aldie
// Free inventory of type when a take item is issued by the script
//
// 396 11/13/98 7:13p Jimdose
// health is now set to 1 if it's less than 1 when changing or entering levels
//
// 395 11/13/98 2:37a Aldie
// Fixed pain event to play sound and flash within bounds
//
// 394 11/11/98 11:12p Aldie
// Added custom gibbing
//
// 393 11/10/98 3:57p Jimdose
// fixed bug where player enters vehicle crouched and the view hieght is too
// low
//
// 392 11/09/98 3:31a Markd
// PM_trace should check for godmode
//
// 391 11/09/98 1:43a Markd
// put in falling protection for landing on ladder
//
// 390 11/09/98 12:55a Jimdose
// added sv_footsteps cvar so that server admins can turn footsteps off
// completely
//
// 389 11/08/98 10:48p Jimdose
// moved earthquake to level struct
//
// 388 11/08/98 8:29p Aldie
// Fix for some console bugs when moving while using them
//
// 387 11/07/98 10:46p Markd
// Fixed music stuff
//
// 386 11/07/98 10:15p Markd
// put in forcemusic support
//
// 385 11/07/98 10:00p Jimdose
// Made spawn and actor commands work with model names
//
// 384 11/07/98 8:01p Markd
// Added in damage_since_pain, fixed some camera stuff
//
// 383 11/07/98 5:29p Aldie
// Drop inventory in coop
//
// 382 11/07/98 5:27p Aldie
// Fixed coop death bug
//
// 381 11/07/98 4:39p Markd
// fixed music stuff
//
// 380 11/07/98 3:34p Markd
// reset music when coming back from action
//
// 379 11/06/98 10:09p Aldie
// Moved has_thought to constructor
//
// 378 11/06/98 9:38p Aldie
// Moved waitforplayer stuff to the think function
//
// 377 11/06/98 5:17p Jimdose
// added missionfailed and missionfailedtime to level vars
// when a mission has failed or the player is dead in single player, the game
// code immediately shows the loadmenu, preventing them from letting the game
// continue running if they exit the menu
//
// 376 11/05/98 2:06a Markd
// changed the way music works a bit, so that action would override anything
// else
//
// 375 10/27/98 9:46p Aldie
// Changed training cvar to level.training
//
// 374 10/27/98 5:10p Aldie
// Fixed take "all" for fists and spidermine
//
// 373 10/26/98 10:32p Aldie
// If onladder, don't get affected by gravitypaths
//
// 372 10/26/98 9:53p Markd
// Moved GotKill around, added gibfest sound
//
// 371 10/26/98 8:12p Aldie
// Fixed some weapon bugs with detaching from owner when removing
//
// 370 10/26/98 5:37p Markd
// expanded whatis functionality
//
// 369 10/26/98 4:30p Aldie
// Changed airtime default to 20
//
// 368 10/26/98 2:17p Aldie
// Added AirClamp
//
// 367 10/26/98 2:18a Aldie
// Added FL_OXYGEN
//
// 366 10/26/98 12:28a Markd
// put in no jc support
//
// 365 10/25/98 11:55p Jimdose
// moved playerfrozen from game to level
//
// 364 10/25/98 10:15p Aldie
// Added training cvar
//
// 363 10/25/98 1:51a Aldie
// Bulletproof the floating inventory code
//
// 362 10/24/98 6:39p Markd
// Added in more dialog based on Blade killing things
//
// 361 10/24/98 6:21p Aldie
// Fixed spidermine error...
//
// 360 10/24/98 5:44p Markd
// Added killent, removent, killclass removeclass and added parameters to
// whatis
//
// 359 10/24/98 3:17p Aldie
// Take out gibs for parent mode
//
// 358 10/24/98 3:14p Aldie
// Addec check for silencer, removed blood checks
//
// 357 10/24/98 2:17p Markd
// Put in JC saying blade was dead
//
// 356 10/24/98 4:05a Markd
// fixed zoomed in in a vehicle
//
// 355 10/24/98 12:42a Markd
// changed origins to worldorigins where appropriate
//
// 354 10/22/98 9:28p Aldie
// Added support for deathgib animations
//
// 353 10/22/98 5:19p Aldie
// Fixed crash of using Powerups
//
// 352 10/22/98 5:04p Markd
// Blade will no longer taunt deaths of civilians or inanimate objects
//
// 351 10/22/98 4:21p Aldie
// Fixed spidermine and fov changing
//
// 350 10/22/98 2:39a Jimdose
// player no longer does crouching bob when in water
//
// 349 10/21/98 10:58p Jimdose
// Made TouchStuff not touch the world
//
// 348 10/21/98 5:28p Aldie
// Added a setskin command
//
// 347 10/21/98 1:45a Aldie
// Fixed silencer clearing out, updated gib test function
//
// 346 10/20/98 10:29p Jimdose
// Restore crosshair when respawning in 3rd person
//
// 345 10/20/98 7:42p Markd
// fixed weapons in vehicles
//
// 344 10/20/98 5:22p Aldie
// Added die_gibs flag
//
// 343 10/19/98 9:53p Jimdose
// Added blend for lightvolume
// changed slime variables to lightvolume
//
// 342 10/19/98 5:29p Aldie
// Increased air time to 20
//
// 341 10/19/98 12:07a Jimdose
// made all code use fast checks for inheritance (no text lookups when
// possible)
// isSubclassOf no longer requires ::_classinfo()
//
// 340 10/18/98 10:55p Aldie
// Added check for useless body removal on bodies that you don't need anything
// from
//
// 339 10/18/98 9:01p Markd
// Added ShowWeapon support for vehicles and zooming in on vehicles
//
// 338 10/18/98 1:31a Aldie
// Added some more stuff to whatis command
//
// 337 10/17/98 12:23a Jimdose
// don't load persistant data during deathmatch
//
// 336 10/16/98 2:27a Jimdose
// Added Endlevel
// saved godmode and notarget on level change
// made cameras work cross level and in savegames
//
// 335 10/16/98 2:18a Aldie
// Took out mutant movement when in single player mutant mode
//
// 334 10/14/98 10:58p Jimdose
// player now archives fov, viewmode, and skin damage
//
// 333 10/14/98 6:29p Markd
// Put in STAT_EXITSIGN
//
// 332 10/14/98 5:34p Aldie
// Mutant stuff
//
// 331 10/14/98 1:19a Jimdose
// Got cross-level persistant info working
//
// 330 10/12/98 8:54p Aldie
// Process player killed events
//
// 329 10/12/98 8:44p Jimdose
// Rewrote init function
// started adding persistant functions
//
// 328 10/12/98 12:59p Markd
// Fixed vehicle entering which messed up intro
//
// 327 10/11/98 9:03p Aldie
// Updated Killed to clear mutant status
//
// 326 10/11/98 7:40p Aldie
// Mutate and restore commands for Richard
//
// 325 10/11/98 5:46p Aldie
// Obituaries
//
// 324 10/11/98 5:33p Aldie
// Fix a couple init bugs
//
// 323 10/11/98 12:02a Aldie
// Adrenaline effects
//
// 322 10/10/98 9:58p Aldie
// Fixed mutant mode bug and changed alpha for PODD.
//
// 321 10/10/98 9:14p Aldie
// Death message and fix camera in spidermines
//
// 320 10/10/98 5:58p Aldie
// More quantumdestab fixes
//
// 319 10/09/98 8:59p Aldie
// Moved oxygen to player
//
// 318 10/09/98 4:54p Markd
// Replaced misc script code with ExecuteThread
//
// 317 10/09/98 2:06a Aldie
// Updated DMFLAGS
//
// 316 10/08/98 7:24p Markd
// changed vehicle movetype from noclip to vehicle
//
// 315 10/07/98 11:57p Jimdose
// Added SetDeltaAngles
// Moved old_pmove out of client
// Moved PlayerFrozen to game
// Init isn't called until client enters game
// Got rid of MonsterGoal
//
// 314 10/03/98 1:09p Aldie
// Fix a bug with flashcolor
//
// 313 10/02/98 7:19p Aldie
// Added flash color to do blinding flashes
//
// 312 9/30/98 11:22p Markd
// Changed taunts from volume 2 to volume 1
//
// 311 9/30/98 11:11p Markd
// Limited fov in deathmatch
//
// 310 9/30/98 5:39p Aldie
// Added showinfo command
//
// 309 9/30/98 3:42p Markd
// put in bulletproofing for start thread functions
//
// 308 9/30/98 1:25p Aldie
// Gib on ion destruct
//
// 307 9/29/98 5:34p Aldie
// Moved gravity nodes to it's own function to fix goddam compiler bug
//
// 306 9/29/98 2:59p Markd
// tried reformatting gravpath stuff
//
// 305 9/29/98 2:12p Aldie
// Trying to fix grav release bug
//
// 304 9/28/98 5:51p Markd
//
// 303 9/28/98 4:34p Markd
// added "player_in_vehicle" variable for scripting
//
// 302 9/28/98 4:07p Aldie
// Added oxygen powerup
//
// 301 9/27/98 6:28p Aldie
// Added water, slime, and lava colors to worldspawn
//
// 300 9/26/98 4:45p Aldie
// Added mutant mode
//
// 299 9/24/98 1:48a Markd
// Made taunts double volume
//
// 298 9/23/98 10:08p Aldie
// Gib on a ION_DESTRUCT
//
// 297 9/22/98 8:10p Aldie
// Initialize some variables causing head bobbing
//
// 296 9/22/98 5:19p Markd
// Put in new consolidated gib function
//
// 295 9/22/98 3:27p Markd
// Took out old variable
//
// 294 9/22/98 3:21p Markd
// put in parentmode lockout for blood and gibs
//
// 293 9/22/98 2:42p Aldie
// Fixed health ticking below 100 when over 100 in prethink
//
// 292 9/22/98 12:14p Aldie
// Added sentientFrozen and exit consoles when you take pain.
//
// 291 9/21/98 1:34a Aldie
// Only do obits in deathmatch
//
// 290 9/20/98 5:11p Aldie
// Fixed a crash with the "give" command
//
// 289 9/19/98 4:47p Markd
// fixed music stuff and added actionincrement to weapons
//
// 288 9/18/98 10:58p Jimdose
// Added spawnactor and actorinfo
//
// 287 9/17/98 8:02p Jimdose
// Removed blending for underwater
//
// 286 9/17/98 1:48p Markd
// Fixed swimmin animations
//
// 285 9/16/98 8:58p Aldie
// Added ability to do a hold down weapon charge
//
// 284 9/16/98 3:13p Aldie
// Initialize poweruptype
//
// 283 9/14/98 4:15p Markd
// zero out velocity when entering vehicles
//
// 282 9/12/98 12:13a Jimdose
// NearestNode was being called even when ai_createnodes was not set
//
// 281 9/11/98 5:03p Aldie
// Initialize draw overlay
//
// 280 9/11/98 2:49p Aldie
// Fixed death message causing crash and added release firing.
//
// 279 9/10/98 8:53p Markd
// put in proper falling and landing animation thresholds.
//
// 278 9/10/98 12:45p Markd
// Added whereami support
//
// 277 9/09/98 5:06p Markd
// Added savefov and restorefov, also added fov change when teleporting
//
// 276 9/09/98 3:03p Markd
// fixed deathmatch camera
//
// 275 9/07/98 6:21p Markd
// cleared out velocity when in vehicle. Also don't use death cam when in
// single player
//
// 274 9/07/98 5:28p Markd
// Fixed player kickangles while jumping, fixed prediciton while in the camera
//
// 273 9/05/98 6:20p Markd
// Fixed player bouncing with kick angles
//
// 272 9/05/98 6:03p Markd
// fixed next weapon and previous weapon in helicopter
//
// 271 9/05/98 12:11p Aldie
// Fixed up falling damage flags and init'ed poweruptimer/poweruptype
//
// 270 9/03/98 4:55p Jimdose
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -