diff --git a/bin/RadiantSP.bat b/bin/RadiantSP.bat deleted file mode 100644 index 13c9c6f..0000000 --- a/bin/RadiantSP.bat +++ /dev/null @@ -1 +0,0 @@ -start spradiant .\sof2SP.qe4 diff --git a/bin/SoF2MPDev.exe b/bin/SoF2MPDev.exe new file mode 100644 index 0000000..72368ec Binary files /dev/null and b/bin/SoF2MPDev.exe differ diff --git a/bin/entitiesSP.def b/bin/entitiesSP.def deleted file mode 100644 index 3402d22..0000000 --- a/bin/entitiesSP.def +++ /dev/null @@ -1,1078 +0,0 @@ -/*QUAKED func_brushmodel_child (0 .8 0) (-8 -8 -8) (8 8 8) - -brushParent --- targetname of our parent brushmodel -*/ - - -/*QUAKED client_model (1 0 0) (-16 -16 -16) (16 16 16) No-LOD -This is a model which is handled solely on the client. This model will not have any physics. - -"model" arbitrary .md3 file to display -"scale" vector representing the scale -*/ - - -/*QUAKED worldeffect_snow (1 0 0) (-16 -16 -16) (16 16 16) -This world effect will spawn snow globally into the level. - -"count" the number of snow particles (default of 1000) -*/ - - -/*QUAKED worldeffect_snowwind (1 0.5 0.5) (-16 -16 -16) (16 16 16) -This world effect will spawn snow wind into the level. - -"origin" the location of the wind -"velocity" the direction/velocity of the wind -"size" the size of the wind brush -*/ - - -/*QUAKED worldeffect_command (1 0.5 0.5) (-16 -16 -16) (16 16 16) -This is a generic world effect command entity. - -"c0" first text command -"c1" second text command -... -"c99" last text command -*/ - - -/*QUAKED worldeffect_lightning (1 0.5 0.5) (-16 -16 -16) (16 16 16) -This is a lightning command - -MinDelay min delay (ms) between lightning low -MaxDelay max delay (ms) between lightning low -MinFlash min (ms) lightning flash -MaxFlash max (ms) lightning flash -MinSoundDelay min (ms) delay until sound -MaxSoundDelay max (ms) delay until sound -FlashColor vector color of lightning (0.0 - 1.0) -NormalColor vector color of regular sky (0.0 - 1.0) -CheckForOutside 1 = check for outside flag -Flicker flicker rate (1 - 10) 10 lots of flicker, 1 = none -SoundRange max distance the thunder is away (500) -*/ - - -/*QUAKED emplaced_wpn (0 .8 0) (-8 -8 -8) (8 8 8) - - Please target an info_notnull entity somewhere behind the gun, so the guy knows where to stand; - about 25 units back and 25 units above the floor will do the job. - -type ---------- name of gun you want to use (use the 'name' field from ext_data/sof2.wpn) -brushParent --- when mounting a weapon on a brushmodel (e.g. a helicopter) -minYaw -------- how far the gun can turn to the right (in degrees, not negative) -maxYaw -------- how far the gun can turn to the left (in degrees) -minPitch ------ how far the gun can point down (in degrees, not negative) -maxPitch ------ how far the gun can point up (in degrees) -angles -------- pitch yaw roll -accuracy ------ 0 = perfect aim, default 0.5 (npc only) -npcDmg -------- how much damage the gun does when used by an NPC in health points (npc only) -burst --------- number of shots fired in a burst, default 5 (npc only) -burstrandom --- burst variance, default 0 (npc only) -burstdelay ---- how long to wait between burst (in seconds), default 0.4 (npc only) -delayrandom --- burstdelay variance in seconds, default 0.0 (npc only) -ammo ---------- doesn't add to player's overall ammo totals. only used on this wpn. -*/ - - -/*QUAKED mounted_wpn (.3 .8 0) (-40 -40 -40) (40 40 40) - - - DON'T EVEN THINK ABOUT USING THIS RIGHT NOW -- FOR TESTING - - GO ON... DELETE ME... YES NOW - -Use FACE_TARGET in an ICARUS script to orientate the Weapon - -type ---------- name of gun you want to use (use the 'name' field from ext_data/sof2.wpn) -brushChild ---- func_brushmodel_child wpn is bolted to -brushParent --- the brushmodel that the brushmodel child is attached to -minYaw -------- how far the gun can turn to the right (in degrees, not negative) -maxYaw -------- how far the gun can turn to the left (in degrees) -minPitch ------ how far the gun can point down (in degrees, not negative) -maxPitch ------ how far the gun can point up (in degrees) -angles -------- pitch yaw roll -accuracy ------ only while NPC is using, 0 = perfect aim, default 0.5 - -*/ - - -/*QUAKED weapon_SAM (0 .3 .8) (-125 -145 -65) (125 145 45) NO_HOMING CHECK_DIST - -The Sam Launcher's base rotates(yaw) and the missle rack rotates(pitch). - -Use FACE_TARGET in an ICARUS script to orientate the SAM towards a target, the missiles will home in on this target when fired -Use SET_ENEMY in an ICARUS script to change the missiles targets, from the default FACE_TARGET entity - - -NO_HOMING missile will not adjust direction if target moves -CHECK_DIST missile does not need to impact with a target, will check if it flew close enough to it's target - -minYaw -------- how far the gun can turn to the right (in degrees, not negative) -maxYaw -------- how far the gun can turn to the left (in degrees) -minPitch ------ how far the gun can point down (in degrees, not negative) -maxPitch ------ how far the gun can point up (in degrees) -maxPitchVel---- how fast pitch changes (degrees per second) default 1 -maxYawVel------ how fast yaw changes (degress per second) default 2 -angles -------- pitch yaw roll -wait ---------- time (in seconds) missile will wait after launch, before homing in on target, default 0.5 -type ---------- name of gun you want to use (use 'name' field from ext_data/sof2.wpn -- default is "SAM") - -*/ - - -/*QUAKED info_player_intermission (1 0 1) (-16 -16 -24) (16 16 32) -The intermission will be viewed from this point. Target an info_notnull for the view direction. -*/ - - -/*QUAKED func_group (0 0 0) ? -Used to group brushes together just for editor convenience. They are turned into normal brushes by the utilities. -"q3map_onlyvertexlighting" add this key along with any value to make the group have vertex only lighting (no lightmaps) - - *****Metashaders***** - -"alphamap" "textures/heightmaps/imagename" - A grayscale image used to determine texture placement on a metashader terrain. -"shader" "metashader/shadername" - References the core name of the metashader (Not mapx_0, just mapx) -"layers" - How many different textures are layered onto the metashader. -"terrain" - Set this to 1 creating a metashader terrain. - -*/ - - -/*QUAKED misc_model (1 0 0) (-16 -16 -16) (16 16 16) RMG -"model" arbitrary .md3 file to display -*/ - - -/*QUAKED info_null (0 0.5 0) (-4 -4 -4) (4 4 4) -Used as a positional target for calculations in the utilities (spotlights, etc), but removed during gameplay. -*/ - - -/*QUAKED info_notnull (0 0.5 0) (-4 -4 -4) (4 4 4) -Used as a positional target for in-game calculation by such ents as ref_tags and for camera TRACK commands -(same as target_position) -*/ - - -/*QUAKED target_position (0 0.5 0) (-4 -4 -4) (4 4 4) -Used as a positional target for in-game calculation, like jumppad targets. -(same as info_notnull) -*/ - - -/*QUAKED info_NPClook (0 0.5 0) (-4 -4 -4) (4 4 4) -Used as a positional location for npcs (like civilians), to want to look at. -*/ - - -/*QUAKED info_NPCtouch (0 0.5 0) (-4 -4 -4) (4 4 4) -Used as a positional location for npcs (like civilians), to want to reach out and touch. -*/ - - -/*QUAKED info_NPCpoint (0 0.5 0) (-4 -4 -4) (4 4 4) -Used as a positional location for npcs (like civilians), to want to point at. -*/ - - -/*QUAKED info_NPCnav (0 0.5 0) (-4 -4 -4) (4 4 4) -Turns into a nav point when spawned -*/ - - -/*QUAKED light (0 1 0) (-8 -8 -8) (8 8 8) linear noIncidence START_OFF -Non-displayed light. -"light" overrides the default 300 intensity. - affects size -a negative "light" will subtract the light's color -'Linear' checkbox gives linear falloff instead of inverse square -'noIncidence' checkbox makes lighting smoother -Lights pointed at a target will be spotlights. -"radius" overrides the default 64 unit radius of a spotlight at the target point. -"scale" multiplier for the light intensity - does not affect size (default 1) - greater than 1 is brighter, between 0 and 1 is dimmer. -"color" sets the light's color -"targetname" to indicate a switchable light -"style" to specify a specify light style, even for switchable lights! -"style_off" light style to use when switched off (Only for switchable lights) - - 1 FLICKER (first variety) - 2 SLOW STRONG PULSE - 3 CANDLE (first variety) - 4 FAST STROBE - 5 GENTLE PULSE 1 - 6 FLICKER (second variety) - 7 CANDLE (second variety) - 8 CANDLE (third variety) - 9 SLOW STROBE (fourth variety) - 10 FLUORESCENT FLICKER - 11 SLOW PULSE NOT FADE TO BLACK - 12 FAST PULSE FOR JEREMY - 13 Test Blending -*/ - - -/*QUAKED misc_bsp (1 0 0) (-16 -16 -16) (16 16 16) -"bspmodel" arbitrary .bsp file to display -*/ - - -/*QUAKED info_NPCcover (0 0.5 0) (-4 -4 -4) (4 4 4) -NPC Soldiers Will Perfer To Use This Cover Point If It Is Near By. You MUST include a target as the place he will go to shoot. -*/ - - -/*QUAKED ref_tag (0.5 0.5 1) (-8 -8 -8) (8 8 8) - -Reference tags which can be positioned throughout the level. -These tags can later be refered to by the scripting system -so that their origins and angles can be referred to. - -mTargetname - the name of this tag -*/ - - -/*QUAKED target_speaker (1 0 0) (-8 -8 -8) (8 8 8) LOOPED-ON LOOPED-OFF GLOBAL ACTIVATOR LONGRANGE -"noise" wav file to play -"soundSet" soundset name to use (do not combine with 'noise', ignores all other flags) - -LOOPED-ON: -Looping sound starts on - -LOOPED-OFF: -Looping sound starts off - -Looped sounds will be toggled by use functions. - -GLOBAL: -A global sound will play full volume throughout the level. - -ACTIVATOR -Activator sounds will play on the player that activated the target. - -LONGRANGE: -A longrange sound will be heard over longer distance but still attenuate. DO NOT USE WITHOUT PERMISSION! -Longrange can't be combined with global -Longrange noise with looping can't be toggled off - -Global and activator sounds can't be combined with looping -(actually 'Global' can, but this is a special case for a level-wide siren. DO NOT USE WITHOUT PERMISSION!) -Normal sounds play each time the target is used. - -Multiple identical looping sounds will just increase volume without any speed cost. -"wait" : Seconds between auto triggerings, 0 = don't auto trigger -"random" wait variance, default is 0 -*/ - - -/*QUAKED target_relay (.5 .5 .5) (-8 -8 -8) (8 8 8) RANDOM -This doesn't perform any actions except fire its targets. -The activator can be forced to be from a certain team. -if RANDOM is checked, only one of the targets will be fired, not all of them -*/ - - -/*QUAKED terrain (1.0 1.0 1.0) ? -Terrain entity -It will stretch to the full height of the brush - -numPatches - integer number of patches to split the terrain brush into (default 200) -terxels - integer number of terxels on a patch side (default 4) (2 <= count <= 8) -seed - integer seed for random terrain generation (default 0) -textureScale - float scale of texture (default 0.005) -heightMap - name of heightmap data image to use -terrainDef - defines how the game textures the terrain (file is base/ext_data/*.terrain - default is grassyhills) -instanceDef - defines which bsp instances appear -generateDef - defines how the heightmap is randomly generated -miscentDef - defines which client models spawn on the terrain (file is base/ext_data/*.miscents) -densityMap - how dense the client models are packed - -*/ - - -/*QUAKED info_player_deathmatch (1 0 1) (-16 -16 -24) (16 16 70) -potential spawning position for SOF2 multiplayer -ONLY USE THIS IF THE MAP YOU ARE WORKING ON IS FOR THE MULTIPLAYER EXECUTABLE -*/ - - -/*QUAKED info_player_start (1 0 0) (-16 -16 -24) (16 16 70) NO_RMG -player's initial spawnpoint -*/ - - -/*QUAKED model_ghoul2 (0 .8 0) (-8 -8 -8) (8 8 8) - -model ---------- filename of the Ghoul2 model you want to use -*/ - - -/*QUAKED model_static (0 .5 0) (-8 -8 -8) (8 8 8) NO_MP -This guy is an awful lot like a misc_model, except this doesn't become part of the bsp. It's -an actual entity in the game that uses an MD3 model. - -model ---------- filename of the MD3 model you want to use -cshader ---------- optional MD3 shader (e.g. /models/objects/Common/toilet_test) -origin --------- like, uh, where the thing is -angles --------- pitch, yaw, roll. I promise. -*/ - - -/*QUAKED func_static (0 .5 .8) ? CHOPPER_FX -A bmodel that just sits there, doing nothing. Can be used for conditional walls and models. - -CHOPPER_FX - does expensive checks, spawning dust or ripples depending what surface is below the chopper - -parent (0, 1) indicates whether or not this model has other models bolted to it -*/ - - -/*QUAKED door_sliding (0 .5 .8) ? START_OPEN CRUSHER USABLE AUTO_CLOSE LOCKED - -START_OPEN the door to moves to its destination when spawned, and operate in reverse. -CRUSHER if door's blocked, it'll continue to try to close, rather than reverse direction -USABLE door opens and closes via the player's USE key -AUTO_CLOSE door will automatically return to its original position after "wait" seconds -LOCKED "USABLE" will be disabled until the first time the door is opened via a script, trigger, etc. - Afterwards, the door will behave normally. - -"angles" determines the opening direction [PITCH YAW ROLL] -"color" constantLight color -"dmg" damage to inflict when blocked (0 default) -"light" constantLight radius -"lip" lip remaining at end of move (8 default) -"speed" opening speed (100 units/s default) -"wait" on automatic-closing doors, wait in seconds before returning (3 default) -"usescript" name of script to play on Use. Do NOT set this if you want default behavior. Set to NULL to return to default -*/ - - -/*QUAKED door_rotating (0 .5 .8) ? X_AXIS Y_AXIS USABLE AUTO_CLOSE LOCKED START_OPEN SMART STAY_LOCKED NON_SOLID UNLOCK_ONLY -You need to have an origin brush as part of this entity. The center of that brush will be -the point around which the door is rotated. It will rotate around the Z axis by default, opening in the -counter clock-wise direction when viewed from above. Use a negative "openangle" value to have it open the other -direction. Check the X or Y AXIS boxes to have it rotate about a different axis. - -USABLE door opens and closes via the player's USE key -AUTO_CLOSE door will automatically return to its original position after "wait" seconds -LOCKED "USABLE" will be disabled until the first time the door is opened via a script, trigger, etc. - Afterwards, the door will behave normally. -START_OPEN the door to moves to its destination when spawned, and operate in reverse. -SMART door will rotate away from the player -STAY_LOCKED door will remain locked even after it has been opened -NON_SOLID door will be non-solid while opening (USE SPARINGLY AND WITH CARE) -UNLOCK_ONLY door (presumably locked) when first used, will unlock only, and not open. Note: STAY_LOCKED will override this. - -"openangle" angle (degrees) through which the door will rotate; default value is 90 -"color" constantLight color -"dmg" damage to inflict when blocked (0 default) -"light" constantLight radius -"speed" determines how fast it moves in degrees per second; default value is 90 -"wait" wait time between openings and closings -"usescript" name of script to play on Use. Do NOT set this if you want default behavior. Set to NULL to return to default -*/ - - -/*QUAKED func_button (0 .5 .8) ? PLAYER_USE -When a button is used it moves some distance in the direction of it's angle, then triggers all of it's targets, then waits and returns to it's original position - -"model2" .md3 model to also draw -"angles" determines the opening direction [PITCH YAW ROLL] -"target" all entities with a matching targetname will be used -"speed" override the default 40 speed -"wait" override the default 3 second wait (-1 = never return) -"lip" override the default 4 pixel lip remaining at end of move -"health" if set, the button must be killed instead of touched -"color" constantLight color -"light" constantLight radius -"usescript" name of script to play on Use. Do NOT set this if you want default behavior. Set to NULL to return to default - -PLAYER_USE player can use button - -*/ - - -/*QUAKED func_rotating (0 .5 .8) ? START_OFF X_AXIS Y_AXIS CRUSHER -You need to have an origin brush as part of this entity. The center of that brush will be -the point around which it is rotated. It will rotate around the Z axis by default. You can -check either the X_AXIS or Y_AXIS box to change that. Toggles on/off when used - -"speed" determines how fast it moves; default value is 100. -"dmg" damage to inflict when blocked (2 default) -"usescript" name of script to play on Use. Do NOT set this if you want default behavior. Set to NULL to return to default - -START_OFF - starts out not rotating -CRUSHER - does damage to entity blocking it - -*/ - - -/*QUAKED pickup_health_small (0 .6 .6) (-8 -8 0) (8 8 10) NOT_EASY NOT_MEDIUM NOT_HARD NOT_SUPERHARD RESPAWN RMG -amount - ?? -startoff - ?? -*/ - - -/*QUAKED pickup_health_big (0 .6 .6) (-17 -17 0) (17 17 10) NOT_EASY NOT_MEDIUM NOT_HARD NOT_SUPERHARD RESPAWN RMG -amount - ?? -startoff - ?? -*/ - - -/*QUAKED pickup_armor_small (0 .6 .6) (-16 -16 0) (16 16 13) NOT_EASY NOT_MEDIUM NOT_HARD NOT_SUPERHARD RESPAWN RMG -amount - ?? -startoff - ?? -*/ - - -/*QUAKED pickup_armor_big (0 .6 .6) (-18 -18 0) (18 18 34) NOT_EASY NOT_MEDIUM NOT_HARD NOT_SUPERHARD RESPAWN RMG -amount - ?? -startoff - ?? -*/ - - -/*QUAKED pickup_weapon (0 .6 .6) (-29 -5 -2) (15 9 10) NOT_EASY NOT_MEDIUM NOT_HARD NOT_SUPERHARD RESPAWN RMG -type ---------- weapon name (found in base/ext_data/sof2.wpn, see below for list as of 10/21/01) -clip ---------- what's in the clip, defaults to full clip for this weapon -altclip ------- what's in the altfire clip, defaults to full (for, say, the OICW. few weapons have this.) -accessories --- 1 adds silencer, 2 adds light, 4 adds laser, 8 is the bayonet -stationary ---- won't interfere with doors, won't be affected by gravity - - AK74 (assault rifle) - M1911A1 (pistol) - M3A1 (sub-machine gun) - M4 (assault rifle) - M590 (shotgun) - M60 (machine gun) - Micro Uzi (sub-machine gun) - MM1 (grenade launcher) - MSG90A1 (sniper rifle) - OICW (assault rifle) - RPG7 (rocket launcher) - US SOCOM (pistol) - USAS-12 (shotgun) -*/ - - -/*QUAKED pickup_ammo (0 .6 .6) (-8 -8 0) (8 8 18) NOT_EASY NOT_MEDIUM NOT_HARD NOT_SUPERHARD RESPAWN RMG -type ---------- ammo name (found in base/ext_data/sof2.ammo, see below for list as of 11/2/01) -amount -------- how many ouchies you want to hand out (default values are in base/ext_data/sof2.ammo) -size ---------- which size model to use (1 = small, 2 = large, default is 1) -stationary ---- won't interfere with doors, won't be affected by gravity - - 0.45 ACP (US SOCOM, M1911A1, M3A1) - 12 gauge (M590, USAS-12) - 40mm grenade (M4/M203, MM1) - 20mm grenade (OICW) - 5.56mm (AK74, M4, OICW) - 7.62mm (M60, MSG90A1) - 9mm (Micro Uzi) - ANM14 (incendiary grenade) - F1 (grenade) - L2A2 (grenade) - M15 (phophorous grenade) - M67 (grenade) - M84 (stun grenade) - MDN11 (grenade) - SMOHG92 (grenade) - RPG7 (RPG7 rockets) - RMG_ammo (**Random Mission Generator**) - -*/ - - -/*QUAKED pickup_equipment (0 .6 .6) (-10 -10 -8) (10 10 1) NOT_EASY NOT_MEDIUM NOT_HARD NOT_SUPERHARD RESPAWN RMG -type ---------- item name (found in base/ext_data/sof2.wpn, see below for list as of 10/21/01) -stationary ---- won't interfere with doors, won't be affected by gravity - - Binoculars - Night Vision - Thermal Vision -*/ - - -/*QUAKED projectile_lobber (.5 .5 .8) (-5 -5 -5) (5 5 5) - - lobs projectiles of any given type. "use" toggles it on and off. - -wait : Seconds between triggerings, 3 second default -randomwait: wait variance in seconds, default is 0 -angles: direction in which the projectiles will be fired -speed: initial speed of projectiles (default is 1000) -randomspeed: speed variance (default is 0) -altfire: using the altfire version of this projectile? (default is false) -timer: if it's timed, how long until one of these projectiles detonates (default is 5 seconds) -randomtimer: timer variance (default is 0 seconds) -count: how many projectiles to use before turning itself off (defaults to 1, -1 is infinite) -type: name of weapon projectile (default is "M67"). list is in sof2.wpn - - possible types as of 4/8/02: - - ANM14 (incendiary grenade) - F1 (grenade) - L2A2 (grenade) - M15 (phophorous grenade) - M67 (grenade) - M84 (stun grenade) - MDN11 (grenade) - SMOHG92 (grenade) - RPG7 (RPG7 rockets) - -*/ - - -/*QUAKED script_runner (0 0.5 0) (-4 -4 -4) (4 4 4) JERSEY_BUTTON RUN_ON_ACTIVATOR -script : filename of the script - -RUN_ON_ACTIVATOR: run the script on whoever activates instead of on the scriptrunner - -*/ - - -/*QUAKED monster_spawner (1 0 0) (-17 -17 -45) (17 17 45) ONCE_ONLY FIRE_TRIGGERS -npctype : NPC Type to be Spawned (this is the classname of the NPC) -max : Maximum number of NPCs to be spawned -removeinlos : If true, characters spawned will remove dead bodies even if in LOS to player -neverdrop : If true, characters spawned will not drop guns when they die -invinciblegun : If ture, characters spawned will have INVINCIBLE_GUN spawnflag set on them -bodytime: How long in milliseconds a character from this MS will stick around after dead -combatpoint: Any characters from this MS will acquire this combat point as their own -attack: These guys will attack while running to combat point. -release: combat point will be abandoned for AI routines when enemy spotted. - - -ONCE_ONLY: monster spawner disappears after one successful activation -FIRE_TRIGGERS: moster spawner passes ability to fire triggers to spawned NPCs - -*/ - - -/*QUAKED traitor_handler (0 .8 0) (-8 -8 -8) (8 8 8) -finaltime --- ammount of time to allow free for all before finalscript is run (default 60 seconds) -finalscript --- name of script to punish player after free for all (default common/failed) -maxhits ------- how many hits to take within buffertime before count down starts (default 3 hits) -buffertime ---- duration before hit counter clears (default 30 seconds) -voiceover ----- set to false if you dont want the voiceovers to play -*/ - - -/*QUAKED security_camera (0 .8 0) (-8 -8 -24) (8 8 0) START_OFF NO_THINK - ------- flags --------- - -START_OFF ----- the usual start off -NO_THINK ------ never moves around but you can turn it on and off by using it - - -------- keys --------- - -type ---------- name of camera you want to use: indoor (default) or outdoor -minYaw -------- how far the camera can turn to the right (in degrees, not negative) -maxYaw -------- how far the camera can turn to the left (in degrees, not negative) -minPitch ------ how far the camera can point up (in degrees, not negative) -maxPitch ------ how far the camera can point down (in degrees, not negative) -camLight ------ non-0 if camera should have a spotlight -angles -------- pitch yaw roll -teamname ------ team the camera is on (e.g. Team_Prometheus ), if not set the camera only fires script if sees player -script ------- name of script to fire when seeing foe (or player in the case of no team) -time ------- ammount of time before auto reset (default is 10000) -startangles --- "rest position" facing of camera. -viewdist ------ how far the camera can see -scripttime ---- time between firings of the script (default is 1000 milliseconds) -deathScript --- called when camera dies. if left blank, nothing happens - - the bounding box you see in the editor is for the indoor camera. the outdoor bbox is much larger. -*/ - - -/*QUAKED security_searchlight (0 .8 0) (-15 -15 0) (15 15 30) START_OFF NO_THINK - ------- flags --------- - -START_OFF ----- the usual start off -NO_THINK ------ never moves around but you can turn it on and off by using it - - -------- keys --------- - -minYaw -------- how far the searchlight can turn to the right (in degrees, not negative) -maxYaw -------- how far the searchlight can turn to the left (in degrees, not negative) -minPitch ------ how far the searchlight can point up (in degrees, not negative) -maxPitch ------ how far the searchlight can point down (in degrees, not negative) -angles -------- pitch yaw roll -teamname ------ team the searchlight is on (e.g. Team_Prometheus ), if not set the searchlight only fires script if sees player -script ------- name of script to fire when seeing foe (or player in the case of no team) -time ------- ammount of time before auto reset (default is 10000) -startangles --- the "rest position" of the light -viewdist ------ how far the searchlight can see -longBeam ------ 1 will turn on a longer beam than normal (default = 0, meaning use the short beam) -deathScript --- called when light dies. if left blank, nothing happens - -*/ - - -/*QUAKED target_stealth (0 .8 0) (-8 -8 -8) (8 8 8) ONCE_ONLY DONTUSE1 ANYNPC INFINITETIMER DONTUSE2 -time ------- ammount of time before auto reset (default is 10000) -*/ - - -/*QUAKED trigger_ladder (.5 .5 .8) ? -material -- determines footstep sounds when climbing. defaults to 3 (solid metal). material list is below. -angles -- which direction should the player be facing when climbing - - this entity doesn't actually spawn into the game so it doesn't count against your max entity limit - - ----- materials ----- - -MATERIAL_NONE 0 -MATERIAL_SOLIDWOOD 1 -MATERIAL_HOLLOWWOOD 2 -MATERIAL_SOLIDMETAL 3 -MATERIAL_HOLLOWMETAL 4 -MATERIAL_SHORTGRASS 5 -MATERIAL_LONGGRASS 6 -MATERIAL_DIRT 7 -MATERIAL_SAND 8 -MATERIAL_GRAVEL 9 -MATERIAL_GLASS 10 -MATERIAL_CONCRETE 11 -MATERIAL_MARBLE 12 -MATERIAL_WATER 13 -MATERIAL_SNOW 14 -MATERIAL_ICE 15 -MATERIAL_FLESH 16 -MATERIAL_MUD 17 -MATERIAL_BPGLASS 18 -MATERIAL_DRYLEAVES 19 -MATERIAL_GREENLEAVES 20 -MATERIAL_FABRIC 21 -MATERIAL_CANVAS 22 -MATERIAL_ROCK 23 -MATERIAL_RUBBER 24 -MATERIAL_PLASTIC 25 -MATERIAL_TILES 26 -MATERIAL_CARPET 27 -MATERIAL_PLASTER 28 -MATERIAL_SHATTERGLASS 29 -MATERIAL_ARMOR 30 -MATERIAL_COMPUTER 31 - -*/ - - -/*QUAKED trigger_multiple (.5 .5 .8) ? ONCE_ONLY PLAYER_USE INACTIVE PLAYER_ONLY NPC_ONLY FRIENDLY_ONLY DIRECTED -wait : Seconds between triggerings, 0.5 default -random: wait variance in seconds, default is 0 -delay : seconds to wait after triggering to fire targets, default 0 - - ONCE_ONLY: trigger goes away after first activation - PLAYER_USE: player must be touching and pressing use key to activate - INACTIVE: starts inactive ( can't be used ) - PLAYER_ONLY: only player can activate/touch - NPC_ONLY: only NPCs can activate/touch - FRIENDLY_ONLY: only the player and friendly NPCs can activate this trigger - DIRECTED: activation is restricted to force the player to be looking in a certain direction - -actAngle: an angle [PITCH YAW ROLL], defaults to 0 0 0, specifies which way the player must be facing to have the icon -appear and to activate the trigger. - -Variable sized repeatable trigger. Must be targeted at one or more entities. -The times between firing is a random time between (wait - random) and (wait + random) -*/ - - -/*QUAKED trigger_health_check (.5 .5 .8) ? ONCE_ONLY PLAYER_USE INACTIVE X X X X ONLY_WHEN_USED -wait : Seconds between triggerings, 0.5 default -random: wait variance in seconds, default is 0 -delay : seconds to wait after triggering to fire targets, default 0 -healthlevel : is the health of the player's vehicle less than this? (defaults to 1000, will be scaled by difficulty just like the vehicle's health) - - ONCE_ONLY: trigger goes away after first activation. I advise setting this if you DON'T set ONLY_WHEN_USED. - PLAYER_USE: player must be touching and pressing use key to activate - INACTIVE: starts inactive ( can't be used ) - ONLY_WHEN_USED: by default, trigger_health_check constantly checks its health. - with this flag trigger_health_check will only check its health when used. - - ***This trigger will fire its targets and remove itself as soon as it is used (or thinks) when the - vehicle's health is less than healthlevel.*** - - -Variable sized repeatable trigger. Must be targeted at one or more entities. -The times between firing is a random time between (wait - random) and (wait + random) -*/ - - -/*QUAKED trigger_distance_warning (.5 .5 .8) ? ONCE_ONLY PLAYER_USE INACTIVE PLAYER_ONLY NPC_ONLY FRIENDLY_ONLY DIRECTED -wait : Seconds between triggerings, 0.5 default -random: wait variance in seconds, default is 0 -delay : seconds to wait after triggering to fire targets, default 0 -distancetarget : targetname of entity to gauge if we should fire targets based on distance -distance : units distancetarget must be to fire targets -lessthan : set to true if you want the target only fired when distancetarget is WITHIN range of user (default firing is out of range) - - ONCE_ONLY: trigger goes away after first activation - PLAYER_USE: player must be touching and pressing use key to activate - INACTIVE: starts inactive ( can't be used ) - PLAYER_ONLY: only player can activate/touch - NPC_ONLY: only NPCs can activate/touch - FRIENDLY_ONLY: only the player and friendly NPCs can activate this trigger - DIRECTED: activation is restricted to force the player to be looking in a certain direction - -actAngle: an angle [PITCH YAW ROLL], defaults to 0 0 0, specifies which way the player must be facing to have the icon -appear and to activate the trigger. - -Variable sized repeatable trigger. Must be targeted at one or more entities. -The times between firing is a random time between (wait - random) and (wait + random) -*/ - - -/*QUAKED trigger_remove (.5 .5 .8) ? ONCE_ONLY PLAYER_USE INACTIVE PLAYER_ONLY NPC_ONLY FRIENDLY_ONLY HIDE_REMOVE -wait : Seconds between triggerings, 0.5 default -count : Entities to be deleted before firing donescript -type1 : NPC class name to delete (if none provided, defaults to any class name) -type2 : Second NPC class name to delete -donescript : name of script to run when count entities have been removed - - ONCE_ONLY: trigger goes away after first activation - PLAYER_USE: player must be touching and pressing use key to activate - INACTIVE: starts inactive ( can't be used ) - PLAYER_ONLY: only player can activate/touch - NPC_ONLY: only NPCs can activate/touch - FRIENDLY_ONLY: only the player and friendly NPCs can activate this trigger - HIDE_REMOVE: only removes when the player can not see - -Variable sized repeatable trigger. Must be targeted at one or more entities. -The times between firing is a random time between (wait - random) and (wait + random) -*/ - - -/*QUAKED trigger_sound (.5 .5 .8) ? ONCE_ONLY PLAYER_USE INACTIVE PLAYER_ONLY NPC_ONLY FRIENDLY_ONLY -wait : Seconds between triggerings, 0.5 default -soundlevel : Sound level the entity touching this trigger must be at to fire targets, 0.7 default - - ONCE_ONLY: trigger goes away after first activation - PLAYER_USE: player must be touching and pressing use key to activate - INACTIVE: starts inactive ( can't be used ) - PLAYER_ONLY: only player can activate/touch - NPC_ONLY: only NPCs can activate/touch - FRIENDLY_ONLY: only the player and friendly NPCs can activate this trigger - -Variable sized repeatable trigger. Must be targeted at one or more entities. -The times between firing is a random time between (wait - random) and (wait + random) -*/ - - -/*QUAKED target_play_music (0 0.5 0) (-4 -4 -4) (4 4 4) ONCE_ONLY -music : filename of the dynamic music -speed : initial speed of music: fast, slow, or off (turns all DM off) -ONCE_ONLY: target play music runner disappears after one successful activation - - -*/ - - -/*QUAKED trigger_objective (.5 .5 .8) ? ONCE_ONLY INACTIVE -command : addmain, completemain, addsub, completesub, addinfomain, addinfosub -item : index number of thing to display, goes with command -command2 : addmain, completemain, addsub, completesub, addinfomain, addinfosub -item2 : index number of thing to display, goes with command2 -command3 : addmain, completemain, addsub, completesub, addinfomain, addinfosub -item3 : index number of thing to display, goes with command3 -*/ - - -/*QUAKED trigger_body_check (.5 .5 .8) ? ONCE_ONLY PLAYER_USE INACTIVE PLAYER_ONLY NPC_ONLY FRIENDLY_ONLY DIRECTED X -wait : Seconds between triggerings, 0.5 default -random: wait variance in seconds, default is 0 -delay : seconds to wait after triggering to fire targets, default 0 - - ONCE_ONLY: trigger goes away after first activation - PLAYER_USE: player must be touching and pressing use key to activate - INACTIVE: starts inactive ( can't be used ) - PLAYER_ONLY: only player can activate/touch - NPC_ONLY: only NPCs can activate/touch - FRIENDLY_ONLY: only the player and friendly NPCs can activate this trigger - DIRECTED: activation is restricted to force the player to be looking in a certain direction - -actAngle: an angle [PITCH YAW ROLL], defaults to 0 0 0, specifies which way the player must be facing to have the icon -appear and to activate the trigger. -noDrop -- if 'true' you can't drop bodies here (defaults to false) - -Variable sized repeatable trigger. Must be targeted at one or more entities. -The times between firing is a random time between (wait - random) and (wait + random) -*/ - - -/*QUAKED trigger_toolbox (.5 .5 .8) ? DIRECTED ONCE_ONLY INACTIVE - -When a player steps into this trigger, an icon will be displayed on the HUD. Pressing the USE key -will activate this trigger's targets. If the "holdtime" key is given a value, the USE key will need -to be held for that time in seconds for the trigger to activate. - -DIRECTED: activation is restricted to force the player to be looking in a certain direction -ONCE_ONLY: trigger disappears after one successful activation -INACTIVE: starts inactive ( can't be used ) - -actAngle: an angle [PITCH YAW ROLL], defaults to 0 0 0, specifies which way the player must be facing to have the icon -appear and to activate the trigger. -holdtime: time (seconds) the use key needs to be held (defaults to 0) -icon: the icon that will be displayed. Refers to an image file in base\gfx\menus. (defaults to hud/blank32) -wait: time (seconds) between activations (defaults to 1) - -startSound: sound played when trigger is first used -endSound: sound played when trigger is done being used -loopSound: sound played while trigger is being used - -*/ - - -/*QUAKED trigger_arioche_objective (.5 .5 .8) ? - -Generic objective for the arioche random mission generator system. When a trigger is -spawned it is associated with the objective object through the name param. - -target: target to activate when objective is met -objective: name of objective (must match an objective in the .mission file) -use: 1 if this objective must be used to complete it -icon: icon to display when in range of the use objective -holdtime: amount of time the use button must be pressed before the objective is complete - -*/ - - -/*QUAKED trigger_hurt (.5 .5 .8) ? START_OFF ONCE_ONLY NO_PROTECTION FALLING INACTIVE -Any entity that touches this will be hurt. -It does dmg points of damage each time it's triggered - -"wait" Seconds between triggerings, default 0.5 -"random" wait variance in seconds, default 0 -"dmg" default 5 -"damageType" 1 = fire (default), 2 = steam, 3 = outright death, 4 = just plain "Ow!" - -START_OFF starts off -ONCE_ONLY trigger goes away after first activation -NO_PROTECTION nothing stops the damage -FALLING damage is a result of falling -INACTIVE starts inactive ( can't be used ) - - -*/ - - -/*QUAKED trigger_timer (0 .5 .8) ? START_OFF PLAYER_USE DISPLAY ONCE INACTIVE -Counts down then fires its targets, -will happen repeatedly unless ONCE is checked -Can be turned on or off by using. - -"time" seconds to wait until firing targets, default 1 -"usescript" name of script to play on Use. Do NOT set this if you want default behavior. Set to NULL to return to default - - -START_OFF timer starts off -PLAYER_USE player can use it, must be touching it -DISPLAY displays time counting down -ONCE will count down and fire once -INACTIVE starts inactive ( can't be used ) - -*/ - - -/*QUAKED trigger_push (0 .5 .8) ? START_OFF INACTIVE PLAYER_ONLY NPC_ONLY -Pushes entity touching it in specified direction. Can be turned on or off by using. -The direction of push can be specified in two ways -1) manually enter the "angles" key/value pair -2) "target" a target_position - if valid "angles" are ignored - -"push" pitch yaw roll (in degrees) - determines direction of push -270 0 0 = up - 90 0 0 = down -"speed" how fast ent is pushed, default 100 -"target" direction to push entity in - -START_OFF trigger starts off -INACTIVE starts inactive ( can't be used ) -PLAYER_ONLY only player can activate/touch -NPC_ONLY only NPCs can activate/touch - -*/ - - -/*QUAKED func_breakable_brush (0 .5 .8) ? INVINCIBLE NO_USE START_OFF -Throws debris and dissapears when used or killed -area portals can be used with this, whether it starts on or off. -if "direction" is given, debris will use it to determine explosion path, else game will determine direction -The texture placed on the brush model determines the material -- look in the shader to determine the material type - - -"splashDamage" damage from explosion, default none -"splashRadius" area of effect, default none -"health" damage needed to die, default 1 -"direction" pitch yaw roll (in degrees) - direction of debris explosion -270 0 0 = up - 90 0 0 = down -"sizescale" overrides programmatic scale determination -- useful for long, thing things -"speedscale" scales speed of debris, default 1 -- only use in special cases -"material" material number, should ONLY be used in SPECIAL cases - i.e. when a brush needs an invisible texture, which has no material. - -1 means no debris at all. period. -"usescript" name of script to play on Use. Do NOT set this if you want default behavior. Set to NULL to return to default - -INVINCIBLE can't be damaged, will only die when used -NO_USE using it will not break it, must be damaged -START_OFF starts invisible, won't be visible or interact in the world in anyway until its used once - - -*/ - - -/*QUAKED func_wall (0 .5 .8) ? START_OFF PLAYER_USE WATER -bmodel that just sits there, can be toggled on/off by using it -area portals can be used with this, whether it starts on or off - -"usescript" name of script to play on Use. Do NOT set this if you want default behavior. Set to NULL to return to default - -START_OFF wall starts off -PLAYER_USE player can use it -WATER if it's water, it moves without doing any pushing or getting blocked - -*/ - - -/*QUAKED func_npcwall (0 .5 .8) ? START_OFF PLAYER_USE -just like func_wall, except that it is a NPC clip brush instead -of a solid wall - -bmodel that just sits there, can be toggled on/off by using it -area portals can be used with this, whether it starts on or off - -"usescript" name of script to play on Use. Do NOT set this if you want default behavior. Set to NULL to return to default - -START_OFF wall starts off -PLAYER_USE player can use it - -*/ - - -/*QUAKED fx_play_effect (.2 .5 .8) (-8 -8 -8) (8 8 8) START_OFF -Plays specified effect file - -"effect" name of .efx file -"wait" seconds between triggerings, default 0.3 -"random" wait variance in seconds, default 0 -"target" direction of effect, default up -"count" plays effect this many times then deletes itself, default -1 = infinite - - -START_OFF fx starts off - - -*/ - - -/*QUAKED target_level_change ( 1 0 0) (-4 -4 -4) (4 4 4) -load the specified map - -"mapname" name of the map to load -"menuname" go to a menu instead of map (example: "select" without the quotes. this is the outfitting menu.). ALSO REQUIRES MAPNAME!! -"menuWpnsFile" (example: "col1" without the quotes) contains list of wpns to display in the provided menu. if you provide a "menuname" you need a "menuWpnsFile", too. -"execFile" the .cfg file (example: "hos1.cfg") to execute instead of immediately changing maps. this allows you to start the next map with no weapons. - - This entity will try to switch to a menu first. If it doesn't have a "menuname" then it will try to run the "execFile". - If it doesn't have an execFile it will try to change maps using "mapname". - -*/ - - -/*QUAKED target_activate ( 1 0 0) (-4 -4 -4) (4 4 4) -Will set the target(s) to be usable/triggerable - -delay : seconds to wait after triggering to fire targets, default 0 - - -*/ - - -/*QUAKED target_deactivate ( 1 0 0) (-4 -4 -4) (4 4 4) -Will set the target(s) to be not usable/triggerable - -delay : seconds to wait after triggering to fire targets, default 0 - - -*/ - - -/*QUAKED target_counter ( 1 0 0) (-4 -4 -4) (4 4 4) -After being used count times, will fire all its targets - -"count" number of times to be used, before firing targets, default 2 - -"resetCount" number of times the counter should reset to it's full count when it's done, default 0 (never reset), -1 = infinite - - -*/ - - -/*QUAKED target_objective ( 0 0 1 ) (-8 -8 -8) (8 8 8) - -Does some objective stuff this isn't in yet. Fun. -*/ - - -/*QUAKED target_visible ( 0 0 1) (-8 -8 -8) (8 8 8) START_OFF NOTRACE - -Fires targets as soon as player can see it, only fires targets once then removes itself. -Most target_visibles should START_OFF then turned on(used) once they're needed - -"radius" player must be at least this close to 'see' this ent, default 512 -"degrees" degrees player must be looking within(player's FOV), default 40 -"timer" number of miliseconds player must be looking at target for it to fire - -START_OFF will not actively check if player is looking until 'used' -NOTRACE will not check if player's sight is blocked, will see through walls, etc... - - -*/ - - -/*QUAKED worldspawn (0 0 0) ? - -Every map should have exactly one worldspawn. -"music" path to WAV or MP3 files (e.g. "music\intro.mp3 music\loopfile.mp3") -"gravity" 800 is default gravity -"message" Text to print during connection process -"soundSet" Ambient sound set -"ambientFog" Set to 1 if the fog is purely for ambience and not for distance culling. -"npcView" View Distance for NPCs -"emplacement" player starts the map using this weapon -"spawnscript" runs on the player on entering level -"rDmgScript" if the player lobs a grenade or similar explosive device anywhere in the level, this script is run -"deathScript" called when player dies. if left blank, common/failed is used by default -"hearscript" the first time player sound is above 0.7 this will fire -"soundlevel" override the default 0.7 soundlevel that triggers hearscript -"dynamic_music" set to OFF to turn off all dynamic music on this level -"vehicle" is the player riding in a helicopter(1), truck(2), or nothing(0, the default) -"vehicleWeapon" use this in pra4, where the player will have a vehicle-mounted wpn but doesn't start the level attached to it -"suit" set to 1 if you want to use the SET_SUIT Icarus command in this map - - -BSP Options -"gridsize" size of lighting grid to "X Y Z". default="64 64 128" -"ambient" scale of global light (from _color) -"fog" shader name of the global fog texture - must include the full path, such as "textures/rj/fog1" -"distancecull" value for vis for the maximum viewing distance -"chopsize" value for bsp on the maximum polygon / portal size -"SkyTexture" shader name for the sky texture -"SkyHeight" z height of the sky -"SkyIntensity" intensity modifier (default of 1.0, range from 0.0 to 3.0) -"SkyAmbient" ambient light vector (default is calculated) -"SkyMinimum" minimum modifier (default of 0.5, range from 0.0 to 1.0) -"SkyEdge" world edge error deviation (default of 100.0) -"ls_Xr" override lightstyle X with this pattern for Red. -"ls_Xg" green (valid patterns are "a-z") -"ls_Xb" blue (a is OFF, z is ON) -"ignoreleaks" tells the bsp process to ignore any leaks, and continue on processing (for instances only) -*/ - - diff --git a/bin/readme.txt b/bin/readme.txt deleted file mode 100644 index 4864e62..0000000 --- a/bin/readme.txt +++ /dev/null @@ -1,25 +0,0 @@ -sof2sdk-101a.zip README: - -Released: Friday, July 19th, 2002 - - -This SDK release is a supplement to the sof2sdk-101.msi release. - - -It includes the following Single Player SDK files: - -- EntitiesSP.def - Single Player Entities Definition File -- RadiantSP.bat - Batch file for running the single player QERadiant Editor -- sof2SP.qe4 - Project file for SOF2 single player QERadiant -- spradiant.exe - Single Player QERadiant Executable - - -Place these four files in your C:\SoF2SDK\bin (by default) folder with the rest of your 1.01 tools. - - -These tools are released "as is" and are unsupported by Raven Software or Activision technical support. - -Enjoy! - -- Raven Software - SOF2 Development Team \ No newline at end of file diff --git a/bin/sof2SP.qe4 b/bin/sof2SP.qe4 deleted file mode 100644 index 918b56e..0000000 --- a/bin/sof2SP.qe4 +++ /dev/null @@ -1,23 +0,0 @@ -{ -"mapspath" "" -"basepath" "C:\SoF2SDK\base" -"rshcmd" "" -"remotebasepath" "C:\SoF2SDK\base" -"entitypath" "C:\SoF2SDK\bin\entitiesSP.def" -"texturepath" "C:\Program Files\Soldier of Fortune II - Double Helix\base\textures\" -"autosave" "C:\SoF2SDK\base\maps\autosave.map" -"confusedpath" "C:\SOF2SDK\confusEd\*.*" -"npcpath" "C:\SOF2SDK\npcs\*.*" -"bsp FullVis (1/2 LMs)" "C:\SoF2SDK\bin\sof2map -bsp -rename -samplesize 32 $ -class 4 && C:\SoF2SDK\bin\sof2map -vis $ -class 2 && C:\SoF2SDK\bin\sof2map -light -extra -samplesize 32 $" -"bsp FullVis" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis $ && C:\SoF2SDK\bin\sof2map -light $" -"bsp FullVis (extra)" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis $ && C:\SoF2SDK\bin\sof2map -light -extra $" -"bsp FullVis (nolight)" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis $" -"bsp FastVis (nolight)" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis -fast $" -"bsp FastVis" "C:\SoF2SDK\bin\sof2map -bsp -rename $ && C:\SoF2SDK\bin\sof2map -vis -fast $ && C:\SoF2SDK\bin\sof2map -light $" -"bsp NoVis" "C:\SoF2SDK\bin\localbatch\novis.bat $" -"bsp OnlyEnts" "C:\SoF2SDK\bin\sof2map -bsp -rename -onlyents $" -"bsp Info" "C:\SoF2SDK\bin\sof2map -info $" -"bsp Relight (extra)" "C:\SoF2SDK\bin\sof2map -bsp -rename -onlyents $ && C:\SoF2SDK\bin\sof2map -light -extra $" -"bsp Relight (1/2 LM)" "C:\SoF2SDK\bin\sof2map -bsp -rename -onlyents $ && C:\SoF2SDK\bin\sof2map -light -extra -samplesize 32 $" -"brush_primit" "0" -} diff --git a/bin/sof2sdk-101a.zip b/bin/sof2sdk-101a.zip deleted file mode 100644 index 762e68b..0000000 Binary files a/bin/sof2sdk-101a.zip and /dev/null differ diff --git a/bin/spradiant.exe b/bin/spradiant.exe deleted file mode 100644 index d21be9b..0000000 Binary files a/bin/spradiant.exe and /dev/null differ diff --git a/code/Sof2MP.dsp b/code/Sof2MP.dsp index 5a914bf..cb3d856 100644 --- a/code/Sof2MP.dsp +++ b/code/Sof2MP.dsp @@ -1,31 +1,31 @@ -# Microsoft Developer Studio Project File - Name="Sof2MP" - Package Owner=<4> +# Microsoft Developer Studio Project File - Name="SoF2MP" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Generic Project" 0x010a -CFG=Sof2MP - Win32 Debug +CFG=SoF2MP - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE -!MESSAGE NMAKE /f "Sof2MP.mak". +!MESSAGE NMAKE /f "SoF2MP.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "Sof2MP.mak" CFG="Sof2MP - Win32 Debug" +!MESSAGE NMAKE /f "SoF2MP.mak" CFG="SoF2MP - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "Sof2MP - Win32 Release" (based on "Win32 (x86) Generic Project") -!MESSAGE "Sof2MP - Win32 Debug" (based on "Win32 (x86) Generic Project") +!MESSAGE "SoF2MP - Win32 Release" (based on "Win32 (x86) Generic Project") +!MESSAGE "SoF2MP - Win32 Debug" (based on "Win32 (x86) Generic Project") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 MTL=midl.exe -!IF "$(CFG)" == "Sof2MP - Win32 Release" +!IF "$(CFG)" == "SoF2MP - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 @@ -38,7 +38,7 @@ MTL=midl.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" -!ELSEIF "$(CFG)" == "Sof2MP - Win32 Debug" +!ELSEIF "$(CFG)" == "SoF2MP - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 @@ -55,7 +55,7 @@ MTL=midl.exe # Begin Target -# Name "Sof2MP - Win32 Release" -# Name "Sof2MP - Win32 Debug" +# Name "SoF2MP - Win32 Release" +# Name "SoF2MP - Win32 Debug" # End Target # End Project diff --git a/code/Sof2MP.dsw b/code/Sof2MP.dsw index 4775777..d2aeec1 100644 --- a/code/Sof2MP.dsw +++ b/code/Sof2MP.dsw @@ -3,6 +3,45 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ############################################################################### +Project: "SoF2MP"=.\SoF2MP.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name gt_ctf + End Project Dependency + Begin Project Dependency + Project_Dep_Name gt_dem + End Project Dependency + Begin Project Dependency + Project_Dep_Name gt_dm + End Project Dependency + Begin Project Dependency + Project_Dep_Name gt_elim + End Project Dependency + Begin Project Dependency + Project_Dep_Name gt_inf + End Project Dependency + Begin Project Dependency + Project_Dep_Name gt_tdm + End Project Dependency + Begin Project Dependency + Project_Dep_Name SoF2cgame + End Project Dependency + Begin Project Dependency + Project_Dep_Name SoF2game + End Project Dependency + Begin Project Dependency + Project_Dep_Name ui + End Project Dependency +}}} + +############################################################################### + Project: "SoF2cgame"=.\cgame\sof2_cgame.dsp - Package Owner=<4> Package=<5> @@ -27,54 +66,6 @@ Package=<4> ############################################################################### -Project: "SoF2ui"=.\ui\sof2_ui.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Sof2MP"=.\Sof2MP.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name SoF2cgame - End Project Dependency - Begin Project Dependency - Project_Dep_Name SoF2game - End Project Dependency - Begin Project Dependency - Project_Dep_Name SoF2ui - End Project Dependency - Begin Project Dependency - Project_Dep_Name gt_ctf - End Project Dependency - Begin Project Dependency - Project_Dep_Name gt_dm - End Project Dependency - Begin Project Dependency - Project_Dep_Name gt_elim - End Project Dependency - Begin Project Dependency - Project_Dep_Name gt_inf - End Project Dependency - Begin Project Dependency - Project_Dep_Name gt_tdm - End Project Dependency -}}} - -############################################################################### - Project: "gt_ctf"=.\gametype\gt_ctf\gt_ctf.dsp - Package Owner=<4> Package=<5> @@ -91,10 +82,6 @@ Project: "gt_dem"=.\gametype\gt_dem\gt_dem.dsp - Package Owner=<4> Package=<5> {{{ - begin source code control - "$/SoF2/code/gametype/gt_dem", ZRDAAAAA - .\gametype\gt_dem - end source code control }}} Package=<4> @@ -151,6 +138,18 @@ Package=<4> ############################################################################### +Project: "ui"=.\ui\sof2_ui.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Global: Package=<5> diff --git a/code/cgame/cg_consolecmds.c b/code/cgame/cg_consolecmds.c index 2a80c86..313ffb9 100644 --- a/code/cgame/cg_consolecmds.c +++ b/code/cgame/cg_consolecmds.c @@ -586,6 +586,7 @@ void CG_InitConsoleCommands( void ) // trap_AddCommand ("kill"); trap_AddCommand ("say"); + trap_AddCommand ("ignore"); trap_AddCommand ("say_team"); trap_AddCommand ("tell"); trap_AddCommand ("vsay_team"); diff --git a/code/cgame/cg_draw.c b/code/cgame/cg_draw.c index 2905ff2..5ea279e 100644 --- a/code/cgame/cg_draw.c +++ b/code/cgame/cg_draw.c @@ -337,6 +337,22 @@ static void CG_DrawTeamScores ( float y ) char scores[2][16]; float w; const char* s; + vec4_t fade = {1,1,1,0.7f}; + float x1; + float y1; + float x2; + float y2; + + // Make sure the radar should be showing + if ( cg.weaponMenuUp ) + { + return; + } + + if ( cgs.clientinfo[cg.predictedPlayerState.clientNum].team == TEAM_SPECTATOR ) + { + return; + } if ( cgs.scores1 == SCORE_NOT_PRESENT ) { @@ -354,13 +370,72 @@ static void CG_DrawTeamScores ( float y ) else { Com_sprintf (scores[1], sizeof(scores[1]), "%i", cgs.scores2); + } + + if ( cg_drawTeamScores.integer > 0 && cg_drawTeamScores.integer < 5 ) + { + switch ( cg_drawTeamScores.integer ) + { + default: + case 3: + x1 = 438; + x2 = 400; + y1 = 5; + y2 = 5; + + break; + + case 1: + x1 = 430; + y1 = 425; + x2 = 470; + y2 = 425; + break; + + case 2: + x1 = 340; + y1 = 395; + x2 = 380; + y2 = 395; + break; + + case 4: + x1 = 600; + x2 = 600; + y1 = 200; + y2 = 250; + break; + } + + trap_R_SetColor ( fade ); + CG_DrawPic ( x1, y1, 32, 32, cgs.media.redFriendShader ); + CG_DrawPic ( x2, y2, 32, 32, cgs.media.blueFriendShader ); + + w = trap_R_GetTextWidth ( scores[0], cgs.media.hudFont, 0.5f, 0 ); + CG_DrawText ( x1 + 16 - w / 2, y1 + 6, cgs.media.hudFont, 0.5f, colorWhite, scores[0], 0, DT_OUTLINE ); + + w = trap_R_GetTextWidth ( scores[1], cgs.media.hudFont, 0.5f, 0 ); + CG_DrawText ( x2 + 16 - w / 2, y2 + 6, cgs.media.hudFont, 0.45f, colorWhite, scores[1], 0, DT_OUTLINE ); + + if ( cgs.gametypeData->respawnType == RT_NONE ) + { + s = va("%d/%d", cg.predictedPlayerState.persistant[PERS_RED_ALIVE_COUNT], CG_TeamCount(TEAM_RED) ); + w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 ); + CG_DrawText ( x1 + 16 - w / 2, y1 + 24, cgs.media.hudFont, 0.35f, colorMdGrey, s, 0, DT_OUTLINE ); + + s = va("%d/%d", cg.predictedPlayerState.persistant[PERS_BLUE_ALIVE_COUNT], CG_TeamCount(TEAM_BLUE) ); + w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 ); + CG_DrawText ( x2 + 16 - w / 2, y2 + 24, cgs.media.hudFont, 0.35f, colorMdGrey, s, 0, DT_OUTLINE ); + } + + trap_R_SetColor ( NULL ); + } + else + { + s = va ( "Red: %s Blue: %s", scores[0], scores[1] ); + w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 ); + CG_DrawText ( RADAR_X + RADAR_RADIUS - w / 2, y, cgs.media.hudFont, 0.35f, g_color_table[ColorIndex(COLOR_GREEN)], s, 0, DT_OUTLINE ); } - - s = va ( "Red: %s Blue: %s", scores[0], scores[1] ); - - w = trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.35f, 0 ); - - CG_DrawText ( RADAR_X + RADAR_RADIUS - w / 2, y, cgs.media.hudFont, 0.35f, g_color_table[ColorIndex(COLOR_GREEN)], s, 0, DT_OUTLINE ); } /* @@ -1046,6 +1121,11 @@ static void CG_DrawCrosshair(void) scale = 1; } + if ( scale > 2 ) + { + scale = 2; + } + w = w * scale; h = h * scale; @@ -1736,16 +1816,15 @@ static void CG_Draw2D( void ) CG_DrawUpperRight(); } - if ( !CG_DrawFollow() ) - { - CG_DrawWarmup(); - } - // don't draw center string if scoreboard is up cg.scoreBoardShowing = CG_DrawScoreboard(); if ( !cg.scoreBoardShowing) { CG_DrawCenterText(); + if ( !CG_DrawFollow() ) + { + CG_DrawWarmup(); + } } // Always Draw chat diff --git a/code/cgame/cg_event.c b/code/cgame/cg_event.c index a4494ad..6bdde06 100644 --- a/code/cgame/cg_event.c +++ b/code/cgame/cg_event.c @@ -353,6 +353,7 @@ static void CG_Obituary( entityState_t *ent ) case MOD_M1911A1_PISTOL: case MOD_USSOCOM_PISTOL: + case MOD_SILVER_TALON: if ( attack == ATTACK_ALTERNATE ) { message = "was pistol whipped by"; @@ -377,11 +378,24 @@ static void CG_Obituary( entityState_t *ent ) } break; + case MOD_M4_ASSAULT_RIFLE: + if ( attack == ATTACK_ALTERNATE ) + { + message = "was detonated by"; + message2 = va("'s %s", "M203" ); + } + else + { + message = "was shot by"; + message2 = va("'s %s", weaponParseInfo[mod].mName ); + } + break; + case MOD_M60_MACHINEGUN: case MOD_MICRO_UZI_SUBMACHINEGUN: case MOD_MP5: case MOD_M3A1_SUBMACHINEGUN: - case MOD_M4_ASSAULT_RIFLE: + case MOD_SIG551: message = "was shot by"; message2 = va("'s %s", weaponParseInfo[mod].mName ); break; @@ -778,6 +792,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.waterWade[rand()%2], -1, -1 ); break; + case EV_ITEM_PICKUP_QUIET: case EV_ITEM_PICKUP: { gitem_t *item; @@ -790,7 +805,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) autoswitch = (es->eventParm & ITEM_AUTOSWITCHBIT)?qtrue:qfalse; // player predicted index - index = es->eventParm & ~ITEM_AUTOSWITCHBIT; + index = es->eventParm & ~(ITEM_AUTOSWITCHBIT|ITEM_QUIETPICKUP); if ( index < 1 || index >= bg_numItems ) { @@ -799,7 +814,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) item = &bg_itemlist[ index ]; - if ( item->pickup_sound ) + if ( event != EV_ITEM_PICKUP_QUIET && item->pickup_sound ) { trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( item->pickup_sound ), -1, -1 ); } @@ -939,7 +954,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) case EV_BULLET_HIT_WALL: DEBUGNAME("EV_BULLET_HIT_WALL"); - if ( !(cg_antiLag.integer && cg_impactPrediction.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) ) + if ( !(cg_antiLag.integer && cg_impactPrediction.integer && !cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) ) { // eventParm contains the direction byte and the material id ByteToDir( (es->eventParm >> MATERIAL_BITS), dir ); @@ -970,7 +985,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) } #ifdef _SOF2_FLESHIMPACTPREDICTION - if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && es->otherEntityNum == cg.predictedPlayerState.clientNum ) ) + if ( !(cg_antiLag.integer && cg_impactPrediction.integer >= 2 && !!cg_synchronousClients.integer && es->otherEntityNum == cg.predictedPlayerState.clientNum ) ) #endif { int fxtype = MATERIAL_FLESH; diff --git a/code/cgame/cg_gore.c b/code/cgame/cg_gore.c index 0f6c318..6deeb92 100644 --- a/code/cgame/cg_gore.c +++ b/code/cgame/cg_gore.c @@ -236,6 +236,7 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi // Smaller guns with pistol whip altfires case WP_M1911A1_PISTOL: + case WP_SILVER_TALON: case WP_USSOCOM_PISTOL: if (attack==ATTACK_ALTERNATE) { // Bonk on the head @@ -293,6 +294,7 @@ void CG_DoGoreFromWeapon( int weaponnum, int attack, vec3_t hitloc, vec3_t hitdi // Medium guns case WP_M3A1_SUBMACHINEGUN: case WP_MP5: + case WP_SIG551: CG_AddGore(irand(PGORE_BULLET_E, PGORE_BULLET_G), flrand( 5.25f, 7.5f), hitloc, hitdirection, entnum, entposition, entangle, ghoul2); if (cg_goreDetail.integer>0) diff --git a/code/cgame/cg_info.c b/code/cgame/cg_info.c index e8e0224..543504a 100644 --- a/code/cgame/cg_info.c +++ b/code/cgame/cg_info.c @@ -265,7 +265,19 @@ void CG_DrawInformation( void ) cg.cheats = qtrue; } else + { + s = Info_ValueForKey( info, "sv_punkbuster" ); + if ( s[0] == '1' ) + { + s = "PUNKBUSTER ENABLED"; + CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y, + cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 ); + + y += PROP_HEIGHT; + } + cg.cheats = qfalse; + } s = cgs.gametypeData->displayName; CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y, @@ -289,6 +301,15 @@ void CG_DrawInformation( void ) cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 ); y += PROP_HEIGHT; } + + value = atoi( Info_ValueForKey( info, "g_friendlyFire" ) ); + if ( value ) + { + s = va( "FRIENDLY FIRE ON" ); + CG_DrawText ( 320 - trap_R_GetTextWidth ( s, cgs.media.hudFont, 0.53f, 0 ) / 2, y, + cgs.media.hudFont, 0.53f, colorWhite, s, 0, 0 ); + y += PROP_HEIGHT; + } } /* diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h index f84ad19..028f345 100644 --- a/code/cgame/cg_local.h +++ b/code/cgame/cg_local.h @@ -712,6 +712,7 @@ typedef struct int timelimit; int maxclients; qboolean friendlyFire; + qboolean punkbuster; char mapname[MAX_QPATH]; char gameover[MAX_QPATH]; @@ -905,6 +906,8 @@ void CG_LoadMenus ( const char *menuFile); void CG_KeyEvent ( int key, qboolean down); void CG_MouseEvent ( int x, int y); void CG_EventHandling ( int type); +int CG_TeamCount ( int team ); + // // cg_view.c diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c index 2d9aa74..60aa9f1 100644 --- a/code/cgame/cg_main.c +++ b/code/cgame/cg_main.c @@ -27,6 +27,7 @@ static void C_GetLerpAngles (void); static void C_GetModelScale (void); static void C_Trace (void); static void C_CameraShake (void); +int CG_TeamScore ( int team ); /* ================ @@ -132,6 +133,7 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a // server is going to attempt to send out multiple broadcasts in hopes that // the client will receive one of them cg.mMapChange = qtrue; + cgs.voteTime = cgs.voteDuration = 0; trap_S_ClearLoopingSounds ( qtrue ); trap_S_StopAllSounds ( ); trap_UI_CloseAll ( ); @@ -160,6 +162,12 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int a return 0; + case CG_GET_TEAM_COUNT: + return CG_TeamCount ( arg0 ); + + case CG_GET_TEAM_SCORE: + return CG_TeamScore ( arg0 ); + default: Com_Error( ERR_FATAL, "vmMain: unknown command %i", command ); break; @@ -501,6 +509,7 @@ void CG_RegisterCvars( void ) trap_Cvar_Register(NULL, "ui_about_gametypename", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 ); trap_Cvar_Register(NULL, "ui_about_scorelimit", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 ); trap_Cvar_Register(NULL, "ui_about_timelimit", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 ); + trap_Cvar_Register(NULL, "ui_about_friendlyfire", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 ); trap_Cvar_Register(NULL, "ui_about_maxclients", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 ); trap_Cvar_Register(NULL, "ui_about_dmflags", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 ); trap_Cvar_Register(NULL, "ui_about_mapname", "0", CVAR_ROM|CVAR_INTERNAL, 0.0, 0.0 ); @@ -544,6 +553,59 @@ static void CG_ForceModelChange( void ) } } +/* +================== +CG_TeamScore +================== +*/ +int CG_TeamScore ( int team ) +{ + switch ( team ) + { + case TEAM_RED: + return cg.predictedPlayerState.persistant[PERS_RED_SCORE]; + + case TEAM_BLUE: + return cg.predictedPlayerState.persistant[PERS_BLUE_SCORE]; + } + + return 0; +} + +/* +================== +CG_TeamCount +================== +*/ +int CG_TeamCount ( int team ) +{ + int count; + int i; + + count = 0; + + for ( i = 0 ; i < cgs.maxclients ; i++ ) + { + clientInfo_t* cl; + + cl = &cgs.clientinfo[ i ]; + + if ( !cl->infoValid ) + { + continue; + } + + if ( team != cl->team ) + { + continue; + } + + count++; + } + + return count; +} + /* ================== CG_UpdateTeamCountCvars @@ -1913,6 +1975,11 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) if ( cgs.gametypeData->description || cgs.pickupsDisabled || cgs.gametypeData->teams ) { cg.popupObjectives = qtrue; + trap_Cvar_Set ( "ui_info_showobjectives", "1" ); + } + else + { + trap_Cvar_Set ( "ui_info_showobjectives", "0" ); } trap_Cvar_Set ( "ui_info_gametype", va("%i",cgs.gametype ) ); diff --git a/code/cgame/cg_newDraw.c b/code/cgame/cg_newDraw.c index 6101b61..e069301 100644 --- a/code/cgame/cg_newDraw.c +++ b/code/cgame/cg_newDraw.c @@ -56,14 +56,8 @@ static void CG_DrawPlayerSniperBullet ( rectDef_t* rect, qhandle_t shader, int b static void CG_DrawPlayerSniperMagnification ( rectDef_t *rect, qhandle_t font, float scale, vec4_t color ) { const char* mag; - - switch ( cg.predictedPlayerState.zoomFov ) - { - default: - case 20: mag = "5x"; break; - case 10: mag = "10x"; break; - case 5: mag = "20x"; break; - } + + mag = weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].name; // Center the text CG_DrawText (rect->x, rect->y, font, scale, color, mag, 0, 0 ); @@ -574,6 +568,19 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param ) visible = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED)?qtrue:qfalse; flags &= ~(CG_SHOW_HUD_SNIPERSCOPE); } + // Only draw the sniper clip when zoomed + else if ( flags & CG_SHOW_HUD_SNIPERCLIP ) + { + if ( cg.predictedPlayerState.weapon == WP_MSG90A1 ) + { + visible = (cg.predictedPlayerState.pm_flags&PMF_ZOOMED)?qtrue:qfalse; + flags &= ~(CG_SHOW_HUD_SNIPERCLIP); + } + else + { + visible = qfalse; + } + } // Draw the health as long as we arent zoomed else if ( flags & CG_SHOW_HUD_HEALTH ) { @@ -597,9 +604,12 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param ) // Should the alternate weapon information be shown? else if (flags & (CG_SHOW_PLAYER_ALT_WEAPONINFO|CG_HIDE_PLAYER_ALT_WEAPONINFO) ) { - if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) + if ( cg.predictedPlayerState.weapon == WP_MSG90A1 ) { - visible = qfalse; + if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) + { + visible = qfalse; + } } if ( cg.showScores ) @@ -623,7 +633,7 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param ) // INvert the visible flag for hidden if ( flags & CG_HIDE_PLAYER_ALT_WEAPONINFO ) { - if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) + if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) ) { visible = qfalse; } @@ -639,7 +649,12 @@ qboolean CG_OwnerDrawVisible(int flags, const char* param ) // Draw the weapon info when we arent zoomed else if ( flags & CG_SHOW_HUD_WEAPONINFO ) { - visible = (cg.showScores||(cg.predictedPlayerState.pm_flags&PMF_ZOOMED))?qfalse:qtrue; + qboolean zoomed = qfalse; + if ( cg.predictedPlayerState.weapon == WP_MSG90A1 && (cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) ) + { + zoomed = qtrue; + } + visible = (cg.showScores||zoomed)?qfalse:qtrue; flags &= ~(CG_SHOW_HUD_WEAPONINFO); } else if (flags & CG_SHOW_ANYTEAMGAME) diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c index e21f403..c050aac 100644 --- a/code/cgame/cg_players.c +++ b/code/cgame/cg_players.c @@ -578,6 +578,7 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader ) { int rf; refEntity_t ent; + clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum]; if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) { @@ -590,8 +591,6 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader ) } memset( &ent, 0, sizeof( ent ) ); - VectorCopy( cent->lerpOrigin, ent.origin ); - ent.origin[2] += 58; ent.reType = RT_SPRITE; ent.customShader = shader; ent.radius = 10; @@ -600,6 +599,20 @@ static void CG_PlayerFloatSprite( centity_t *cent, qhandle_t shader ) ent.shaderRGBA[1] = 255; ent.shaderRGBA[2] = 255; ent.shaderRGBA[3] = 255; + + if ( ci->boltNightvision == -1 ) + { + ci->boltNightvision = trap_G2API_AddBolt( cent->ghoul2, 0, "*head_t" ); + } + + // Fall back to make sure its correct + if ( !G2_PositionEntityOnBolt ( &ent, cent->ghoul2, 0, ci->boltNightvision, cent->lerpOrigin, cent->pe.ghoulLegsAngles, cent->modelScale ) ) + { + ci->boltNightvision = -1; + } + + ent.origin[2] += 15; + trap_R_AddRefEntityToScene( &ent ); } @@ -861,21 +874,12 @@ static void CG_UpdatePlayerAnimations ( centity_t* cent ) CG_PlayerGametypeItems =============== */ -void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles ) +void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles, int rf ) { clientInfo_t *ci = &cgs.clientinfo[cent->currentState.clientNum]; int i; - int rf; - if ( cent->currentState.number == cg.snap->ps.clientNum && !cg.renderingThirdPerson ) - { - // only show in mirrors - rf = RF_THIRD_PERSON; - } - else - { - rf = 0; - } + rf = rf & RF_THIRD_PERSON; // If the player is wearing goggles then draw them on their head if ( cent->currentState.eFlags & EF_GOGGLES ) @@ -924,7 +928,10 @@ void CG_PlayerGametypeItems ( centity_t* cent, vec3_t angles ) memset ( &item, 0, sizeof(item) ); item.renderfx = rf | RF_MINLIGHT; item.ghoul2 = cg_items[ MODELINDEX_GAMETYPE_ITEM + i ].boltModel; - G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale ); + if ( !G2_PositionEntityOnBolt ( &item, cent->ghoul2, 0, ci->boltGametypeItems[i], cent->lerpOrigin, angles, cent->modelScale ) ) + { + ci->boltGametypeItems[i] = -1; + } trap_R_AddRefEntityToScene(&item); } } @@ -959,7 +966,10 @@ void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force ) // If the weapon model hasnt changed then dont update it else if ( !force && cent->currentState.weapon == cent->pe.weapon ) { - return; + if ( -1 != trap_G2API_GetBoltIndex ( cent->ghoul2, cent->pe.weaponModelSpot ) ) + { + return; + } } else { @@ -972,7 +982,7 @@ void CG_UpdatePlayerWeaponModel ( centity_t* cent, qboolean force ) } // Get rid of whats in their hand - if ( cent->pe.weaponModelSpot ) + if ( cent->pe.weaponModelSpot && cent->pe.weaponModelSpot != -1 ) { trap_G2API_DetachG2Model ( cent->ghoul2, cent->pe.weaponModelSpot ); trap_G2API_RemoveGhoul2Model( ¢->ghoul2, cent->pe.weaponModelSpot ); @@ -1211,7 +1221,7 @@ void CG_Player( centity_t *cent ) // Render any of the floating sprites above the players head CG_PlayerSprites ( cent ); - CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles ); + CG_PlayerGametypeItems ( cent, cent->pe.ghoulLegsAngles, renderfx ); VectorCopy ( save, cent->lerpOrigin ); } @@ -1225,6 +1235,11 @@ A player just came into view or teleported, so reset all animation info */ void CG_ResetPlayerEntity( centity_t *cent ) { + clientInfo_t *ci; + int i; + + ci = &cgs.clientinfo[cent->currentState.clientNum]; + cent->errorTime = -99999; // guarantee no error decay added cent->extrapolated = qfalse; @@ -1236,6 +1251,7 @@ void CG_ResetPlayerEntity( centity_t *cent ) cent->pe.legs.anim = -1; cent->pe.torso.anim = -1; + cent->pe.weapon = -1; memset( ¢->pe.legs, 0, sizeof( cent->pe.legs ) ); cent->pe.legs.yawAngle = cent->rawAngles[YAW]; @@ -1248,6 +1264,12 @@ void CG_ResetPlayerEntity( centity_t *cent ) cent->pe.torso.yawing = qfalse; cent->pe.torso.pitchAngle = cent->rawAngles[PITCH]; cent->pe.torso.pitching = qfalse; + + // Reset all bolt position + for ( i = 0; i < MAX_GAMETYPE_ITEMS; i ++ ) + { + ci->boltGametypeItems[i] = -1; + } } /* diff --git a/code/cgame/cg_playerstate.c b/code/cgame/cg_playerstate.c index 5be301e..f46033f 100644 --- a/code/cgame/cg_playerstate.c +++ b/code/cgame/cg_playerstate.c @@ -226,7 +226,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) } // Look for a zoom transition that isnt the first zoom in - if ( ops->zoomFov && (ps->zoomFov != ops->zoomFov) ) + if ( weaponData[ops->weapon].zoom[ops->zoomFov].fov && (weaponData[ps->weapon].zoom[ps->zoomFov].fov != weaponData[ops->weapon].zoom[ops->zoomFov].fov) ) { trap_S_StartLocalSound ( cgs.media.zoomSound, CHAN_AUTO ); } @@ -252,6 +252,9 @@ void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) cg.thisFrameTeleport = qtrue; // make sure we don't get any unwanted transition effects *ops = *ps; + + CG_SetWeaponAnim(ps->weaponAnimId&(~ANIM_TOGGLEBIT),ps); + CG_UpdateViewWeaponSurfaces ( ps ); } // damage events (player is getting wounded) diff --git a/code/cgame/cg_predict.c b/code/cgame/cg_predict.c index eb5e27c..2d0b500 100644 --- a/code/cgame/cg_predict.c +++ b/code/cgame/cg_predict.c @@ -369,6 +369,7 @@ static void CG_TouchItem( centity_t *cent ) { gitem_t *item; qboolean autoswitch = qfalse; + int eventID; if ( !cg_predictItems.integer ) { @@ -413,8 +414,17 @@ static void CG_TouchItem( centity_t *cent ) } } + if ( cg.predictedPlayerState.pm_flags & PMF_DUCKED ) + { + eventID = EV_ITEM_PICKUP_QUIET; + } + else + { + eventID = EV_ITEM_PICKUP; + } + // grab it - BG_AddPredictableEventToPlayerstate( EV_ITEM_PICKUP, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState); + BG_AddPredictableEventToPlayerstate( eventID, cent->currentState.modelindex|(autoswitch?ITEM_AUTOSWITCHBIT:0) , &cg.predictedPlayerState); // remove it from the frame so it won't be drawn cent->currentState.eFlags |= EF_NODRAW; diff --git a/code/cgame/cg_public.h b/code/cgame/cg_public.h index 0c373f4..5a9e137 100644 --- a/code/cgame/cg_public.h +++ b/code/cgame/cg_public.h @@ -346,6 +346,9 @@ typedef enum CG_VOICE_EVENT, + CG_GET_TEAM_COUNT, + CG_GET_TEAM_SCORE, + } cgameExport_t; // CG_POINT_CONTENTS diff --git a/code/cgame/cg_servercmds.c b/code/cgame/cg_servercmds.c index 43de190..12b1bc3 100644 --- a/code/cgame/cg_servercmds.c +++ b/code/cgame/cg_servercmds.c @@ -90,6 +90,7 @@ void CG_ParseServerinfo( void ) cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) ); cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) ); cgs.friendlyFire = atoi( Info_ValueForKey( info, "g_friendlyFire" ) ) ? qtrue : qfalse; + cgs.punkbuster = atoi( Info_ValueForKey( info, "sv_punkbster" ) ) ? qtrue : qfalse; mapname = Info_ValueForKey( info, "mapname" ); Com_sprintf( cgs.mapname, sizeof( cgs.mapname ), "maps/%s.bsp", mapname ); @@ -97,6 +98,7 @@ void CG_ParseServerinfo( void ) trap_Cvar_Set ( "ui_about_gametypename", cgs.gametypeData->displayName ); trap_Cvar_Set ( "ui_about_scorelimit", va("%i", cgs.scorelimit ) ); trap_Cvar_Set ( "ui_about_timelimit", va("%i", cgs.timelimit ) ); + trap_Cvar_Set ( "ui_about_friendlyfire", va("%i", cgs.friendlyFire) ); trap_Cvar_Set ( "ui_about_maxclients", va("%i", cgs.maxclients ) ); trap_Cvar_Set ( "ui_about_dmflags", va("%i", cgs.dmflags ) ); trap_Cvar_Set ( "ui_about_mapname", mapname ); diff --git a/code/cgame/cg_snapshot.c b/code/cgame/cg_snapshot.c index b52ece9..b0b0ffb 100644 --- a/code/cgame/cg_snapshot.c +++ b/code/cgame/cg_snapshot.c @@ -27,8 +27,6 @@ static void CG_ResetEntity( centity_t *cent ) { CG_ResetPlayerEntity( cent ); } - - cent->pe.weapon = 0; } /* diff --git a/code/cgame/cg_view.c b/code/cgame/cg_view.c index e0b1f56..668a825 100644 --- a/code/cgame/cg_view.c +++ b/code/cgame/cg_view.c @@ -588,7 +588,6 @@ static void CG_OffsetFirstPersonView( void ) float f; vec3_t predictedVelocity; int timeDelta; - vec3_t right; if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { return; @@ -732,8 +731,8 @@ static void CG_OffsetFirstPersonView( void ) leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET; angles[ROLL] += leanOffset / 4; - AngleVectors( cg.predictedPlayerState.viewangles, NULL, right, NULL ); - VectorMA( origin, leanOffset, right, origin ); + + BG_ApplyLeanOffset ( &cg.predictedPlayerState, origin ); } // Make sure view doesnt invert on itself @@ -856,7 +855,7 @@ static int CG_CalcFov( void ) { if ( cg.predictedPlayerState.pm_flags & PMF_ZOOMED ) { - zoomFov = (float)cg.predictedPlayerState.zoomFov; + zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov; if (!cg.predictedPlayerState.pm_flags & PMF_ZOOM_LOCKED ) { @@ -885,6 +884,8 @@ static int CG_CalcFov( void ) { } else { + zoomFov = (float)weaponData[cg.predictedPlayerState.weapon].zoom[cg.predictedPlayerState.zoomFov].fov; + f = ( cg.time - cg.predictedPlayerState.zoomTime ) / ZOOM_OUT_TIME; if ( f > 1.0 ) { @@ -892,7 +893,7 @@ static int CG_CalcFov( void ) { } else { - fov_x = cg.predictedPlayerState.zoomFov + f * ( fov_x - cg.predictedPlayerState.zoomFov ); + fov_x = zoomFov + f * ( fov_x - zoomFov ); } } } @@ -1285,7 +1286,14 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo } else if ( cg.snap->ps.pm_flags & PMF_FOLLOW ) { - cg.renderingThirdPerson = qtrue; + if ( cg.snap->ps.pm_flags & PMF_FOLLOWFIRST ) + { + cg.renderingThirdPerson = qfalse; + } + else + { + cg.renderingThirdPerson = qtrue; + } } else { diff --git a/code/cgame/cg_weapons.c b/code/cgame/cg_weapons.c index c6500ec..070ac58 100644 --- a/code/cgame/cg_weapons.c +++ b/code/cgame/cg_weapons.c @@ -382,6 +382,7 @@ void CG_UpdateViewWeaponSurfaces ( playerState_t* ps ) break; case WP_M1911A1_PISTOL: + case WP_SILVER_TALON: case WP_USSOCOM_PISTOL: { int forward; @@ -1000,7 +1001,7 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack ) ent = ¢->currentState; // Dont bother if antilag is turned off or its a projectile weapon - if ( cg_antiLag.integer < 1 || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE)) + if ( cg_antiLag.integer < 1 || cg_synchronousClients.integer || !cg_impactPrediction.integer || (weaponData[ent->weapon].attack[attack].weaponFlags & PROJECTILE_FIRE)) { return; } @@ -1019,12 +1020,7 @@ void CG_PredictedBullet ( centity_t* cent, attackType_t attack ) VectorCopy(cg.predictedPlayerState.viewangles, fireAngs); if ( cg.predictedPlayerState.pm_flags & PMF_LEANING ) { - vec3_t right; - float leanOffset; - - leanOffset = (float)(cg.predictedPlayerState.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET; - AngleVectors( fireAngs, NULL, right, NULL ); - VectorMA( start, leanOffset, right, start ); + BG_ApplyLeanOffset ( &cg.predictedPlayerState, start ); } seed = cg.predictedPlayerState.stats[STAT_SEED]; @@ -1778,7 +1774,7 @@ void CG_WeaponCallback ( playerState_t* ps, centity_t* cent, int weapon, int ani { // Play sound. // FIXME: randomly select sound?? - trap_S_StartSound(NULL,ent->number,CHAN_WEAPON,weaponInfo->otherWeaponSounds[i][0], -1, -1); + trap_S_StartSound(NULL,ent->number,CHAN_AUTO,weaponInfo->otherWeaponSounds[i][0], -1, -1); break; } } diff --git a/code/cgame/sof2_cgame.dsp b/code/cgame/sof2_cgame.dsp index d60a579..38070cb 100644 --- a/code/cgame/sof2_cgame.dsp +++ b/code/cgame/sof2_cgame.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 -CFG=SoF2cgame - Win32 SH Debug SoF2 +CFG=SoF2cgame - Win32 Release SoF2 !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,19 +13,16 @@ CFG=SoF2cgame - Win32 SH Debug SoF2 !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 SH Debug SoF2" +!MESSAGE NMAKE /f "sof2_cgame.mak" CFG="SoF2cgame - Win32 Release SoF2" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "SoF2cgame - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "SoF2cgame - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "SoF2cgame - Win32 SH Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe @@ -88,562 +85,152 @@ LINK32=link.exe # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x30000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\Debug\sof2mp_cgamex86.dll" # SUBTRACT LINK32 /pdb:none -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SoF2cgame___Win32_SH_Debug_SoF2" -# PROP BASE Intermediate_Dir "SoF2cgame___Win32_SH_Debug_SoF2" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "SoF2cgame___Win32_SH_Debug_SoF2" -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /G5 /MTd /W4 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_SOF2" /FR /YX /FD /c -# ADD CPP /nologo /G5 /MTd /W4 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "_SOF2" /D "MEM_DEBUG" /D "CGAME" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "_Debug SoF2" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "_Debug SoF2" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /d "_Debug SoF2" -# ADD RSC /l 0x409 /d "_Debug SoF2" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\Debug\sof2mp_cgamex86.dll" -# SUBTRACT BASE LINK32 /pdb:none -# ADD LINK32 /nologo /base:"0x30000000" /subsystem:windows /dll /pdb:"..\SHDebug/sof2mp_cgamex86.pdb" /map:"..\SHDebug\sof2mp_cgamex86.map" /debug /machine:I386 /def:".\SoF2_cgame.def" /out:"..\SHDebug\sof2mp_cgamex86.dll" -# SUBTRACT LINK32 /pdb:none - !ENDIF # Begin Target # Name "SoF2cgame - Win32 Release SoF2" # Name "SoF2cgame - Win32 Debug SoF2" -# Name "SoF2cgame - Win32 SH Debug SoF2" # Begin Group "Source Files" # PROP Default_Filter "c" # Begin Source File SOURCE=..\game\bg_gametype.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\game\bg_lib.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP BASE Exclude_From_Build 1 -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" -# PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=..\game\bg_misc.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\game\bg_player.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\game\bg_pmove.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\game\bg_slidemove.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\game\bg_weapons.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_consolecmds.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_draw.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_drawtools.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_effects.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_ents.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_event.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_gametype.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_gore.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_info.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_light.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_localents.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_main.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_miscents.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_newDraw.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_players.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_playerstate.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_predict.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_scoreboard.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_servercmds.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_snapshot.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_syscalls.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_view.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_weaponinit.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\cg_weapons.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\game\q_math.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\game\q_shared.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\ui\ui_shared.c - -!IF "$(CFG)" == "SoF2cgame - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2cgame" - -!ENDIF - # End Source File # End Group # Begin Group "Header Files" @@ -679,10 +266,18 @@ SOURCE=.\cg_public.h # End Source File # Begin Source File +SOURCE=.\cg_was.h +# End Source File +# Begin Source File + SOURCE=..\qcommon\disablewarnings.h # End Source File # Begin Source File +SOURCE=.\fx_local.h +# End Source File +# Begin Source File + SOURCE=..\ghoul2\G2.h # End Source File # Begin Source File @@ -748,11 +343,6 @@ SOURCE=.\SoF2_cgame.def # PROP Exclude_From_Build 1 -!ELSEIF "$(CFG)" == "SoF2cgame - Win32 SH Debug SoF2" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - !ENDIF # End Source File diff --git a/code/game/ai_main.c b/code/game/ai_main.c index 741f06c..c5e4d67 100644 --- a/code/game/ai_main.c +++ b/code/game/ai_main.c @@ -726,6 +726,7 @@ int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean resta bs->botWeaponWeights[WP_NONE] = 0; bs->botWeaponWeights[WP_KNIFE] = 1; bs->botWeaponWeights[WP_M1911A1_PISTOL] = 3; + bs->botWeaponWeights[WP_SILVER_TALON] = 4; bs->botWeaponWeights[WP_USSOCOM_PISTOL] = 2; bs->botWeaponWeights[WP_M4_ASSAULT_RIFLE] = 10; bs->botWeaponWeights[WP_AK74_ASSAULT_RIFLE] = 9; @@ -742,6 +743,7 @@ int BotAISetupClient(int client, struct bot_settings_s *settings, qboolean resta bs->botWeaponWeights[WP_ANM14_GRENADE] = 2; bs->botWeaponWeights[WP_M15_GRENADE] = 2; bs->botWeaponWeights[WP_MP5] = 7; + bs->botWeaponWeights[WP_SIG551] = 7; BotUtilizePersonality(bs); @@ -3489,6 +3491,7 @@ float BotWeaponCanLead(bot_state_t *bs) // no leading needed for any bullet weapons case WP_M1911A1_PISTOL: + case WP_SILVER_TALON: case WP_USSOCOM_PISTOL: case WP_M4_ASSAULT_RIFLE: case WP_AK74_ASSAULT_RIFLE: @@ -3496,6 +3499,7 @@ float BotWeaponCanLead(bot_state_t *bs) case WP_MICRO_UZI_SUBMACHINEGUN: case WP_M3A1_SUBMACHINEGUN: case WP_MP5: + case WP_SIG551: case WP_MSG90A1: case WP_USAS_12_SHOTGUN: case WP_M590_SHOTGUN: diff --git a/code/game/ai_wpnav.c b/code/game/ai_wpnav.c index 2277b7a..405cb8c 100644 --- a/code/game/ai_wpnav.c +++ b/code/game/ai_wpnav.c @@ -1353,6 +1353,7 @@ float botGlobalNavWeaponWeights[WP_NUM_WEAPONS] = 6,//WP_M15_GRENADE, 6,//WP_MP5 + 6,//WP_SIG551 }; int GetNearestVisibleWPToItem(vec3_t org, int ignore) diff --git a/code/game/bg_misc.c b/code/game/bg_misc.c index bdb87bd..e1cb08b 100644 --- a/code/game/bg_misc.c +++ b/code/game/bg_misc.c @@ -223,6 +223,27 @@ Pistol, uses 45 rounds OUTFITTING_GROUP_PISTOL, }, +/*QUAKED pickup_weapon_silvertalon (0 .6 .6) (-15 -15 -15) (15 15 15) +Pistol, uses 45 rounds +*/ + { + "pickup_weapon_silvertalon", + "sound/player/pickup/weapon.wav", + { "models/weapons/silver_talon/world/silver_talonworld.glm", + 0, 0, 0}, +/* icon */ "gfx/menus/hud/weapon_icons/silver_talonicon", + "*gfx/menus/weapon_renders/silver_talon", + "a", +/* pickup */ "Silver Talon", + 7, + IT_WEAPON, + WP_SILVER_TALON, +/* precache */ "", +/* sounds */ "", + + OUTFITTING_GROUP_PISTOL, + }, + /*QUAKED pickup_weapon_microuzi (0 .6 .6) (-15 -15 -15) (15 15 15) Sub-Machinegun, uses 9mm rounds */ @@ -265,6 +286,27 @@ Sub-Machinegun, uses 45 rounds OUTFITTING_GROUP_SECONDARY, }, +/*QUAKED pickup_weapon_MP5 (0 .6 .6) (-15 -15 -15) (15 15 15) +Sub-Machinegun, uses 9mm rounds +*/ + { + "pickup_weapon_MP5", + "sound/player/pickup/weapon.wav", + { "models/weapons/mp5/world/mp5world.glm", + 0, 0, 0}, +/* icon */ "gfx/menus/hud/weapon_icons/mp5_icon", + "gfx/menus/weapon_renders/mp5", + "a", +/* pickup */ "MP5 Sub-machinegun", + 30, + IT_WEAPON, + WP_MP5, +/* precache */ "", +/* sounds */ "", + + OUTFITTING_GROUP_PRIMARY, + }, + /*QUAKED pickup_weapon_USAS_12 (0 .6 .6) (-15 -15 -15) (15 15 15) Shotgun, uses 12-gauge rounds ammo ---------- amount of ammo (defaults to 10) @@ -371,6 +413,27 @@ Assault Rifle, uses 5.56 rounds OUTFITTING_GROUP_PRIMARY, }, +/*QUAKED pickup_weapon_SIG551 (0 .6 .6) (-15 -15 -15) (15 15 15) +Assault Rifle, uses 5.56 rounds +*/ + { + "pickup_weapon_SIG551", + "sound/player/pickup/weapon.wav", + { "models/weapons/sig551/world/sig551world.glm", + 0, 0, 0}, +/* icon */ "gfx/menus/hud/weapon_icons/sig551_icon", + "gfx/menus/weapon_renders/sig551", + "an", +/* pickup */ "SIG551 Assault", + 30, + IT_WEAPON, + WP_SIG551, +/* precache */ "", +/* sounds */ "", + + OUTFITTING_GROUP_PRIMARY, + }, + /*QUAKED pickup_weapon_M60 (0 .6 .6) (-15 -15 -15) (15 15 15) Machinegun, uses 7.62 rounds */ @@ -518,27 +581,6 @@ White Phosphorus Grenade OUTFITTING_GROUP_GRENADE, }, -/*QUAKED pickup_weapon_MP5 (0 .6 .6) (-15 -15 -15) (15 15 15) -Sub-Machinegun, uses 9mm rounds -*/ - { - "pickup_weapon_MP5", - "sound/player/pickup/weapon.wav", - { "models/weapons/mp5/world/mp5world.glm", - 0, 0, 0}, -/* icon */ "gfx/menus/hud/weapon_icons/mp5_icon", - "gfx/menus/weapon_renders/mp5", - "a", -/* pickup */ "MP5 Sub-machinegun", - 30, - IT_WEAPON, - WP_MP5, -/* precache */ "", -/* sounds */ "", - - OUTFITTING_GROUP_PRIMARY, - }, - // // AMMO ITEMS // diff --git a/code/game/bg_player.c b/code/game/bg_player.c index 3dd5623..f44aa29 100644 --- a/code/game/bg_player.c +++ b/code/game/bg_player.c @@ -36,11 +36,11 @@ char bg_availableOutfitting[WP_NUM_WEAPONS] = {-1}; int bg_outfittingGroups[OUTFITTING_GROUP_MAX][MAX_OUTFITTING_GROUPITEM] = { - { MODELINDEX_WEAPON_AK74, MODELINDEX_WEAPON_M4, MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_MP5, MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_MM1, -1, -1 }, - { MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_M3A1, -1, -1, -1, -1, -1, -1, - 1 }, - { MODELINDEX_WEAPON_M19, MODELINDEX_WEAPON_SOCOM, -1, -1, -1, -1, -1, -1, -1, -1 }, - { MODELINDEX_WEAPON_SMOHG92, MODELINDEX_WEAPON_M84, MODELINDEX_WEAPON_M15, MODELINDEX_WEAPON_ANM14, -1, -1, -1, -1, -1, -1 }, - { MODELINDEX_ARMOR, MODELINDEX_NIGHTVISION, MODELINDEX_THERMAL, -1, -1, -1, -1, -1, -1, -1 }, + { MODELINDEX_WEAPON_AK74, MODELINDEX_WEAPON_M4, MODELINDEX_WEAPON_SIG551, MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_MSG90A1, MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_MP5, MODELINDEX_WEAPON_RPG7, MODELINDEX_WEAPON_MM1, -1, -1, -1 }, + { MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MICROUZI, MODELINDEX_WEAPON_M3A1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { MODELINDEX_WEAPON_M19, MODELINDEX_WEAPON_SOCOM, MODELINDEX_WEAPON_SILVERTALON, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, + { MODELINDEX_WEAPON_SMOHG92, MODELINDEX_WEAPON_M84, MODELINDEX_WEAPON_M15, MODELINDEX_WEAPON_ANM14, -1, -1, -1, -1, -1, -1, -1, -1 }, + { MODELINDEX_ARMOR, MODELINDEX_NIGHTVISION, MODELINDEX_THERMAL, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, }; /* @@ -1743,4 +1743,21 @@ int BG_ParseOutfittingTemplates ( qboolean force ) return bg_outfittingCount; } +/* +======================== +BG_ApplyLeanOffset +Applies the given lean offset to the origin +======================== +*/ +void BG_ApplyLeanOffset ( playerState_t* ps, vec3_t origin ) +{ + float leanOffset; + vec3_t up; + vec3_t right; + + leanOffset = (float)(ps->leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET; + AngleVectors( ps->viewangles, NULL, right, up); + VectorMA( origin, leanOffset, right, origin ); + VectorMA( origin, Q_fabs(leanOffset) * -0.20f, up, origin ); +} diff --git a/code/game/bg_pmove.c b/code/game/bg_pmove.c index b1e1954..e2b489a 100644 --- a/code/game/bg_pmove.c +++ b/code/game/bg_pmove.c @@ -1197,7 +1197,7 @@ static void PM_CrashLand( int impactMaterial, vec3_t impactNormal ) pm->ps->velocity[0] *= 0.25f; pm->ps->velocity[1] *= 0.25f; - pm->ps->pm_time = 500; + pm->ps->pm_time = 750; } // create a local entity event to play the sound @@ -2382,7 +2382,7 @@ static void PM_FinishWeaponChange( void ) PM_HandleWeaponAction(WACT_READY); - pm->ps->weaponTime = min(500,pm->ps->weaponTime); + pm->ps->weaponTime = min(150,pm->ps->weaponTime); PM_StartTorsoAnim( pm->ps, weaponData[pm->ps->weapon].animRaise, pm->ps->weaponAnimTime ); } @@ -2500,6 +2500,24 @@ int PM_GetAttackButtons(void) pm->ps->pm_debounce &= ~PMD_FIREMODE; } + // As soon as the button is released you are ok to press attack again + if ( pm->ps->pm_debounce & PMD_ATTACK ) + { + if ( !(buttons & BUTTON_ATTACK) ) + { + pm->ps->pm_debounce &= ~(PMD_ATTACK); + } + else if ( pm->ps->firemode[pm->ps->weapon] != WP_FIREMODE_AUTO ) + { + buttons &= ~BUTTON_ATTACK; + } + } + + if ( pm->ps->stats[STAT_FROZEN] ) + { + buttons &= ~BUTTON_ATTACK; + } + // Handle firebutton in varous firemodes. switch( pm->ps->firemode[pm->ps->weapon] ) { @@ -2507,26 +2525,16 @@ int PM_GetAttackButtons(void) break; case WP_FIREMODE_BURST: + // Debounce attack button and disable other buttons during burst fire. if(buttons&BUTTON_ATTACK) { - if( !(pm->ps->pm_debounce & PMD_ATTACK)) + if(!pm->ps->weaponFireBurstCount) { - pm->ps->pm_debounce |= PMD_ATTACK; - if(!pm->ps->weaponFireBurstCount) - { - pm->ps->weaponFireBurstCount=3; - } - } - else - { - buttons &= ~BUTTON_ATTACK; + pm->ps->weaponFireBurstCount=3; } } - else - { - pm->ps->pm_debounce &= ~PMD_ATTACK; - } + if(pm->ps->weaponFireBurstCount) { buttons|=BUTTON_ATTACK; @@ -2539,23 +2547,6 @@ int PM_GetAttackButtons(void) break; case WP_FIREMODE_SINGLE: - // Debounce attack button. - if(buttons&BUTTON_ATTACK) - { - if(!(pm->ps->pm_debounce & PMD_ATTACK)) - { - pm->ps->pm_debounce |= PMD_ATTACK; - } - else - { - buttons&=~BUTTON_ATTACK; - } - } - else - { - pm->ps->pm_debounce &= ~PMD_ATTACK; - } - break; } @@ -2598,15 +2589,19 @@ static void PM_Weapon_AddInaccuracy( attackType_t attack ) // Zoomed sniper weapons don't add innacuracy if ont hte ground if( (pm->ps->pm_flags & PMF_ZOOMED) && pml.groundPlane ) { - return; + pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].zoomInaccuracy; + } + else + { + pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].inaccuracy; } - - pm->ps->inaccuracy += weaponData[pm->ps->weapon].attack[attack].inaccuracy; pm->ps->inaccuracyTime = RECOVER_TIME; if ( pm->ps->inaccuracy > weaponData[pm->ps->weapon].attack[attack].maxInaccuracy ) + { pm->ps->inaccuracy = weaponData[pm->ps->weapon].attack[attack].maxInaccuracy; + } } /* @@ -2948,11 +2943,6 @@ static void PM_Weapon( void ) if( pm->ps->weaponstate == WEAPON_ZOOMIN ) { // The zoomfov may still be remembered from a reload while zooming - if ( !pm->ps->zoomFov ) - { - pm->ps->zoomFov = 20; - } - pm->ps->pm_flags |= PMF_ZOOMED; pm->ps->pm_flags |= PMF_ZOOM_LOCKED; pm->ps->pm_flags &= ~PMF_ZOOM_REZOOM; @@ -3026,6 +3016,7 @@ static void PM_Weapon( void ) pm->ps->weaponstate=WEAPON_READY; return; } + break; default: break; } @@ -3116,7 +3107,7 @@ static void PM_Weapon( void ) } // Handle zooming in/out for sniper rifle. - if(pm->ps->weapon==WP_MSG90A1) + if( weaponData[pm->ps->weapon].zoom[0].fov ) { if( (attackButtons&BUTTON_ALT_ATTACK) || (pm->ps->pm_flags & PMF_ZOOM_REZOOM) ) { @@ -3134,22 +3125,20 @@ static void PM_Weapon( void ) { if(pm->cmd.buttons&BUTTON_ZOOMIN) { - pm->ps->zoomFov = pm->ps->zoomFov >> 1; - if ( pm->ps->zoomFov < 5) - { - pm->ps->zoomFov = 5; + if ( pm->ps->zoomFov + 1 < ZOOMLEVEL_MAX && weaponData[pm->ps->weapon].zoom[pm->ps->zoomFov+1].fov ) + { + pm->ps->zoomFov++; + pm->ps->weaponTime=175; } - pm->ps->weaponTime=175; return; } else if(pm->cmd.buttons&BUTTON_ZOOMOUT) { - pm->ps->zoomFov = pm->ps->zoomFov << 1; - if(pm->ps->zoomFov > 20 ) + if ( pm->ps->zoomFov > 0 ) { - pm->ps->zoomFov = 20; + pm->ps->zoomFov--; + pm->ps->weaponTime=175; } - pm->ps->weaponTime=175; return; } } @@ -3263,6 +3252,8 @@ static void PM_Weapon( void ) return; } + pm->ps->pm_debounce |= PMD_ATTACK; + // Decrease the ammo (*ammoSource) -= attackData->fireAmount; @@ -3408,10 +3399,9 @@ static void PM_CheckLean( void ) // check for collision VectorCopy( pm->ps->origin, start ); - start[2] += pm->ps->viewheight; AngleVectors( pm->ps->viewangles, NULL, right, NULL ); - VectorSet( mins, -6, -6, -8 ); - VectorSet( maxs, 6, 6, 8 ); + VectorSet( mins, -6, -6, -20 ); + VectorSet( maxs, 6, 6, 20 ); // since we're moving the camera over // check that move @@ -3877,13 +3867,8 @@ void PM_UpdatePVSOrigin ( pmove_t *pmove ) // Set a pm flag for leaning and calculate the view origin for the lean if ( pm->ps->leanTime - LEAN_TIME != 0 ) { - vec3_t right; - float leanOffset; - - leanOffset = (float)(pm->ps->leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET; - - AngleVectors( pm->ps->viewangles, NULL, right, NULL ); - VectorMA( pm->ps->origin, leanOffset, right, pm->ps->pvsOrigin ); + VectorCopy ( pm->ps->origin, pm->ps->pvsOrigin ); + BG_ApplyLeanOffset ( pm->ps, pm->ps->pvsOrigin ); } else { diff --git a/code/game/bg_public.h b/code/game/bg_public.h index 3639230..edecfc7 100644 --- a/code/game/bg_public.h +++ b/code/game/bg_public.h @@ -12,10 +12,36 @@ #include "../../ui/menudef.h" #include "inv.h" +//#define GAME_VERSION "sof2mp-0.01" sent on 11/26/2001 +//#define GAME_VERSION "sof2mp-0.02" sent on 12/10/2001 +//#define GAME_VERSION "sof2mp-0.03" sent on 12/16/2001 +//#define GAME_VERSION "sof2mp-0.081" sent on 1/15/2002 +//#define GAME_VERSION "sof2mp-0.09" sent on 1/24/2002 +//#define GAME_VERSION "sof2mp-0.10" sent on 1/31/2002 +//#define GAME_VERSION "sof2mp-0.11" sent on 2/7/2002 +//#define GAME_VERSION "sof2mp-0.12" sent on 2/14/2002 +//#define GAME_VERSION "sof2mp-0.13" sent on 2/21/2002 +//#define GAME_VERSION "sof2mp-0.13b" public beta #1 on 3/1/3002 +//#define GAME_VERSION "sof2mp-0.14" sent on 3/4/2002 +//#define GAME_VERSION "sof2mp-0.15" sent on 3/11/2002 +//#define GAME_VERSION "sof2mp-0.15b" public beta #2 on 3/13/2002 +//#define GAME_VERSION "sof2mp-0.16" sent on 3/18/2002 +//#define GAME_VERSION "sof2mp-0.16b" public beta #3 on 3/20/2002 +//#define GAME_VERSION "sof2mp-0.17" sent on 3/24/2002 +//#define GAME_VERSION "sof2mp-1.01t" sent on 3/28/2002 +//#define GAME_VERSION "sof2mp-0.18" sent on 4/1/2002 - April Fools! +//#define GAME_VERSION "sof2mp-1.02t" sent on 4/5/2002 +//#define GAME_VERSION "sof2mp-0.19" sent on 4/8/2002 +//#define GAME_VERSION "sof2mp-0.20" sent on 4/15/2002 - Tax Day! +//#define GAME_VERSION "sof2mp-0.21" sent on 4/22/2002 +//#define GAME_VERSION "sof2mp-1.00.22" sent on 4/26/2002 +//#define GAME_VERSION "sof2mp-1.00.23" sent on 4/27/2002 #ifdef GERMAN_BUILD - #define GAME_VERSION "sof2mp-mod-1.01g" +// #define GAME_VERSION "sof2mp-1.00g" + #define GAME_VERSION "sof2mp-1.02g" #else - #define GAME_VERSION "sof2mp-mod-1.01" +// #define GAME_VERSION "sof2mp-1.00" + #define GAME_VERSION "sof2mp-1.02" #endif #define DEFAULT_GRAVITY 800 @@ -36,12 +62,12 @@ #define SCORE_NOT_PRESENT -9999 // for the CS_SCORES[12] when only one player is present #define DEFAULT_PLAYER_Z_MAX 43 -#define CROUCH_PLAYER_Z_MAX 26 +#define CROUCH_PLAYER_Z_MAX 18 #define PRONE_PLAYER_Z_MAX -12 #define DEAD_PLAYER_Z_MAX -30 #define DUCK_ACCURACY_MODIFIER 0.75f -#define JUMP_ACCURACY_MODIFIER 1.5f +#define JUMP_ACCURACY_MODIFIER 2.0f #define MINS_Z -46 @@ -325,6 +351,7 @@ typedef struct ladder_s // changes so a restart of the same anim can be detected #define ANIM_TOGGLEBIT 2048 // Note that there are 12 bits (max 4095) for animations. #define ITEM_AUTOSWITCHBIT (1<<31) +#define ITEM_QUIETPICKUP (1<<30) typedef enum { @@ -382,6 +409,7 @@ typedef enum { #define PMF_AUTORELOAD 0x00400000 // autoreloading enabled #define PMF_SIAMESETWINS 0x00800000 +#define PMF_FOLLOWFIRST 0x01000000 // First person following #define PMF_ALL_TIMES (PMF_TIME_WATERJUMP|PMF_TIME_LAND|PMF_TIME_KNOCKBACK) #define PMF_ZOOM_FLAGS (PMF_ZOOMED|PMF_ZOOM_LOCKED|PMF_ZOOM_REZOOM|PMF_ZOOM_DEFER_RELOAD) @@ -503,6 +531,9 @@ typedef enum PERS_RED_SCORE, // Blue team score PERS_BLUE_SCORE, // red team score + PERS_RED_ALIVE_COUNT, // number of alive people on the red team + PERS_BLUE_ALIVE_COUNT, // number of alive people on the blue team + } persEnum_t; @@ -591,6 +622,7 @@ typedef enum EV_WATER_CLEAR, EV_ITEM_PICKUP, // normal item pickups are predictable + EV_ITEM_PICKUP_QUIET, // quiet pickup EV_NOAMMO, EV_CHANGE_WEAPON, @@ -1018,7 +1050,7 @@ typedef struct SSkinTemplate #define MAX_MODEL_SOUNDS 8 #define MAX_IDENTITIES 256 #define MAX_OUTFITTINGS 64 -#define MAX_OUTFITTING_GROUPITEM 10 +#define MAX_OUTFITTING_GROUPITEM 12 typedef struct SModelSounds { @@ -1064,7 +1096,7 @@ extern TIdentity bg_identities[]; extern int bg_identityCount; extern goutfitting_t bg_outfittings[]; extern int bg_outfittingCount; -extern int bg_outfittingGroups[][10]; +extern int bg_outfittingGroups[][MAX_OUTFITTING_GROUPITEM]; extern char *bg_weaponNames[WP_NUM_WEAPONS]; extern stringID_table_t bg_animTable [MAX_ANIMATIONS+1]; @@ -1081,6 +1113,7 @@ void BG_DecompressOutfitting ( const char* compressed, goutfitting_t* outf void BG_CompressOutfitting ( goutfitting_t* outfitting, char* compressed, int size ); int BG_ParseOutfittingTemplates ( qboolean force ); int BG_FindOutfitting ( goutfitting_t* outfitting); +void BG_ApplyLeanOffset ( playerState_t* ps, vec3_t origin ); /******************************************************************************* * diff --git a/code/game/bg_weapons.c b/code/game/bg_weapons.c index 79a0f7c..57a149a 100644 --- a/code/game/bg_weapons.c +++ b/code/game/bg_weapons.c @@ -14,6 +14,7 @@ char *bg_weaponNames[WP_NUM_WEAPONS] = "Knife", // WP_KNIFE, "M1911A1", // WP_M1911A1_PISTOL, "US SOCOM", // WP_US_SOCOM_PISTOL, + "Silver Talon", // WP_SILVER_TALON, "M590", // WP_M590_SHOTGUN, "Micro Uzi", // WP_MICRO_UZI_SUBMACHINEGUN, "M3A1", // WP_M3A1_SUBMACHINEGUN, @@ -21,6 +22,7 @@ char *bg_weaponNames[WP_NUM_WEAPONS] = "USAS-12", // WP_USAS_12_SHOTGUN, "M4", // WP_M4_ASSAULT_RIFLE, "AK74", // WP_AK74_ASSAULT_RIFLE, + "Sig 551", // WP_SIG551 "MSG90A1", // WP_MSG90A1_SNIPER_RIFLE, "M60", // WP_M60_MACHINEGUN, "MM1", // WP_MM1_GRENADE_LAUNCHER, @@ -156,6 +158,38 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void return qtrue; } + // Zoom information + trap_GPG_FindPairValue(attacksub, "action", "", tmpStr); + if ( !Q_stricmp ( tmpStr, "toggleZoom" ) ) + { + weaponData_t *weapon; + void *value; + int zoomlvl; + + weapon = &weaponData[weaponNum]; + + sub = trap_GPG_FindSubGroup(attacksub, "zoomFactors"); + if ( !sub ) + { + return qfalse; + } + + value = trap_GPG_GetPairs(sub); + zoomlvl = 0; + while(value) + { + trap_GPV_GetName ( value, weapon->zoom[zoomlvl].name ); + trap_GPV_GetTopValue(value, tmpStr ); + + weapon->zoom[zoomlvl].fov = atoi ( tmpStr ); + + value = trap_GPV_GetNext ( value ); + zoomlvl ++; + } + + return qtrue; + } + // Assign a melee attribute if there is one trap_GPG_FindPairValue(attacksub, "mp_melee||melee", "none", tmpStr ); if ( Q_stricmp ( tmpStr, "none" ) ) @@ -219,6 +253,8 @@ static qboolean BG_ParseAttackStats ( int weaponNum, attackData_t* attack, void attack->damage = atoi(tmpStr); trap_GPG_FindPairValue(attacksub, "mp_inaccuracy||inaccuracy", "0", tmpStr); attack->inaccuracy = (int)(atof(tmpStr)*1000.0f); + trap_GPG_FindPairValue(attacksub, "mp_zoominaccuracy", "0", tmpStr); + attack->zoomInaccuracy = (int)(atof(tmpStr)*1000.0f); trap_GPG_FindPairValue(attacksub, "mp_maxInaccuracy||maxInaccuracy", "0", tmpStr); attack->maxInaccuracy = (int)(atof(tmpStr)*1000.0f); trap_GPG_FindPairValue(attacksub, "mp_gore||gore", "YES", tmpStr); @@ -1196,12 +1232,12 @@ void BG_CalculateBulletEndpoint ( vec3_t muzzlePoint, vec3_t fireAngs, float ina float f1; float f2; - f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f; - f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f; + f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f; + f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f; fGaussianX = (f1-0.5f) + (f2-0.5f); - f1 = (float)(Q_rand ( seed ) % 15000) / 15000.0f; - f2 = (float)(Q_rand ( seed ) % 15000) / 15000.0f; + f1 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f; + f2 = (float)((unsigned int)Q_rand ( seed ) % 15000) / 15000.0f; fGaussianY = (f1-0.5f) + (f2-0.5f); fGaussian = fGaussianX * fGaussianX + fGaussianY * fGaussianY; diff --git a/code/game/bg_weapons.h b/code/game/bg_weapons.h index ee6537b..5670f12 100644 --- a/code/game/bg_weapons.h +++ b/code/game/bg_weapons.h @@ -16,6 +16,7 @@ typedef enum // Pistols MOD_M1911A1_PISTOL, MOD_USSOCOM_PISTOL, + MOD_SILVER_TALON, // Secondarys MOD_M590_SHOTGUN, @@ -27,6 +28,8 @@ typedef enum MOD_USAS_12_SHOTGUN, MOD_M4_ASSAULT_RIFLE, MOD_AK74_ASSAULT_RIFLE, + MOD_SIG551, + MOD_MSG90A1_SNIPER_RIFLE, MOD_M60_MACHINEGUN, MOD_MM1_GRENADE_LAUNCHER, @@ -60,6 +63,7 @@ typedef enum // Pistols WP_M1911A1_PISTOL, WP_USSOCOM_PISTOL, + WP_SILVER_TALON, // Secondarys WP_M590_SHOTGUN, @@ -71,6 +75,8 @@ typedef enum WP_USAS_12_SHOTGUN, WP_M4_ASSAULT_RIFLE, WP_AK74_ASSAULT_RIFLE, + WP_SIG551, + WP_MSG90A1, WP_M60_MACHINEGUN, WP_MM1_GRENADE_LAUNCHER, @@ -140,6 +146,16 @@ typedef enum } ECategory; +#define MAX_ZOOMNAME 8 +#define ZOOMLEVEL_MAX 3 + +typedef struct zoomData_s +{ + int fov; + char name[MAX_ZOOMNAME]; + +} zoomData_t; + typedef struct attackData_s { char name[MAX_QPATH]; @@ -160,6 +176,7 @@ typedef struct attackData_s int fireFromClip; // 0 = fire from approp. ammo pool, 1 = fire from clip int damage; // how much damage is done per hit float inaccuracy; // how inaccurate is weapon + float zoomInaccuracy; // how inaccurate is the weapon when zoomed float maxInaccuracy; // maximum lvl of inaccuracy int pellets; // how many individual 'bullets' are shot with one trigger pull? int weaponFlags; // which fire modes are available, projectiles timed or impact, .etc @@ -207,6 +224,7 @@ typedef struct weaponData_s attackData_t attack[ATTACK_MAX]; + zoomData_t zoom[ZOOMLEVEL_MAX]; } weaponData_t; diff --git a/code/game/g_active.c b/code/game/g_active.c index 27d1c0c..60e6c67 100644 --- a/code/game/g_active.c +++ b/code/game/g_active.c @@ -499,6 +499,9 @@ void G_UpdatePlayerStateScores ( gentity_t* ent ) { ent->client->ps.persistant[PERS_RED_SCORE] = level.teamScores[TEAM_RED]; ent->client->ps.persistant[PERS_BLUE_SCORE] = level.teamScores[TEAM_BLUE]; + + ent->client->ps.persistant[PERS_BLUE_ALIVE_COUNT] = level.teamAliveCount[TEAM_BLUE]; + ent->client->ps.persistant[PERS_RED_ALIVE_COUNT] = level.teamAliveCount[TEAM_RED]; } else { @@ -566,6 +569,11 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) // attack button cycles through spectators if ( client->sess.spectatorState != SPECTATOR_FOLLOW && g_forceFollow.integer ) { + if ( g_forceFollow.integer > 1 ) + { + client->sess.spectatorFirstPerson = qtrue; + } + Cmd_FollowCycle_f( ent, 1 ); } if ( ( client->buttons & BUTTON_ATTACK ) && ! ( client->oldbuttons & BUTTON_ATTACK ) ) @@ -575,11 +583,33 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) else if ( ( client->buttons & BUTTON_ALT_ATTACK ) && ! ( client->oldbuttons & BUTTON_ALT_ATTACK ) ) { Cmd_FollowCycle_f( ent, -1 ); - } + } else if ( !g_forceFollow.integer && ucmd->upmove > 0 && (client->ps.pm_flags & PMF_FOLLOW) ) { G_StopFollowing( ent ); } + else if ( (client->buttons & BUTTON_USE) && !( client->oldbuttons & BUTTON_USE ) ) + { + // If not following then go to either third or first + if ( client->sess.spectatorState != SPECTATOR_FOLLOW ) + { + client->sess.spectatorFirstPerson = g_forceFollow.integer < 2 ? qfalse : qtrue; + Cmd_FollowCycle_f( ent, -1 ); + } + // If in first person then either go to free float or third person + else if ( client->sess.spectatorFirstPerson ) + { + if ( g_forceFollow.integer < 2 ) + { + client->sess.spectatorFirstPerson = qfalse; + } + } + // Must be in third person so just go to first + else + { + client->sess.spectatorFirstPerson = qtrue; + } + } } /* @@ -1101,6 +1131,15 @@ void ClientThink_real( gentity_t *ent ) // Update the client animation info G_UpdateClientAnimations ( ent ); + + if ( ent->client->ps.pm_flags & PMF_LEANING ) + { + ent->r.svFlags |= SVF_LINKHACK; + } + else + { + ent->r.svFlags &= ~SVF_LINKHACK; + } // link entity now, after any personal teleporters have been used trap_LinkEntity (ent); @@ -1358,6 +1397,10 @@ void SpectatorClientEndFrame( gentity_t *ent ) ent->client->ps = cl->ps; ent->client->ps.pm_flags |= PMF_FOLLOW; + if ( ent->client->sess.spectatorFirstPerson ) + { + ent->client->ps.pm_flags |= PMF_FOLLOWFIRST; + } ent->client->ps.eFlags = flags; ent->client->ps.persistant[PERS_SPAWN_COUNT] = count; ent->client->ps.persistant[PERS_SCORE] = score; diff --git a/code/game/g_antilag.c b/code/game/g_antilag.c index bf54033..2999968 100644 --- a/code/game/g_antilag.c +++ b/code/game/g_antilag.c @@ -232,15 +232,17 @@ void G_UndoAntiLag ( void ) continue; } - if ( other->r.svFlags & SVF_DOUBLED_BBOX ) + if ( other->r.svFlags & SVF_INFLATED_BBOX ) { // Put the hitbox back the way it was other->r.maxs[0] = other->client->maxSave[0]; other->r.maxs[1] = other->client->maxSave[1]; + other->r.maxs[2] = other->client->maxSave[2]; + other->r.mins[0] = other->client->minSave[0]; other->r.mins[1] = other->client->minSave[1]; - other->r.svFlags &= (~SVF_DOUBLED_BBOX); + other->r.svFlags &= (~SVF_INFLATED_BBOX); } G_UndoClientAntiLag ( other ); @@ -306,8 +308,15 @@ void G_ApplyAntiLag ( gentity_t* ref, qboolean enlargeHitBox ) { other->client->minSave[0] = other->r.mins[0]; other->client->minSave[1] = other->r.mins[1]; + other->client->maxSave[0] = other->r.maxs[0]; other->client->maxSave[1] = other->r.maxs[1]; + other->client->maxSave[2] = other->r.maxs[2]; + + if ( other->client->ps.pm_flags & PMF_DUCKED ) + { + other->r.maxs[2] += 10; + } // Adjust the hit box to account for hands and such // that are sticking out of the normal bounding box @@ -327,7 +336,7 @@ void G_ApplyAntiLag ( gentity_t* ref, qboolean enlargeHitBox ) other->r.mins[1] *= 2.0f; } - other->r.svFlags |= SVF_DOUBLED_BBOX; + other->r.svFlags |= SVF_INFLATED_BBOX; } // Relink the entity into the world diff --git a/code/game/g_bot.c b/code/game/g_bot.c index 1799705..4120668 100644 --- a/code/game/g_bot.c +++ b/code/game/g_bot.c @@ -182,6 +182,23 @@ const char *G_GetArenaInfoByMap( const char *map ) return NULL; } +/* +=============== +G_DoesMapExist + +determines whether or not the given map exists on the server +=============== +*/ +qboolean G_DoesMapExist ( const char* mapname ) +{ + if ( G_GetArenaInfoByMap ( mapname ) ) + { + return qtrue; + } + + return qfalse; +} + /* =============== G_DoesMapSupportGametype diff --git a/code/game/g_client.c b/code/game/g_client.c index bb88410..4828009 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -176,7 +176,9 @@ gspawn_t* G_SelectRandomSpawnPoint ( team_t team ) return tfspawns[ rand() % tfcount ]; } - return spawns[ rand() % count ]; + i = rand() % count; + + return spawns[ i ]; } /* @@ -1218,12 +1220,16 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) gclient_t *client; char userinfo[MAX_INFO_STRING]; char ip[128]; + char guid[64]; gentity_t *ent; ent = &g_entities[ clientNum ]; trap_GetUserinfo( clientNum, userinfo, sizeof( userinfo ) ); + value = Info_ValueForKey (userinfo, "cl_guid"); + Com_sprintf ( guid, sizeof(guid), value ); + // check to see if they are on the banned IP list value = Info_ValueForKey (userinfo, "ip"); Com_sprintf ( ip, sizeof(ip), value ); @@ -1271,7 +1277,7 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) } // get and distribute relevent paramters - G_LogPrintf( "ClientConnect: %i - %s\n", clientNum, ip ); + G_LogPrintf( "ClientConnect: %i - %s [%s]\n", clientNum, ip, guid ); ClientUserinfoChanged( clientNum ); // don't do the "xxx connected" messages if they were caried over from previous level @@ -1290,6 +1296,7 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) CalculateRanks(); // Make sure they are unlinked + ent->s.number = clientNum; trap_UnlinkEntity ( ent ); return NULL; @@ -1366,7 +1373,7 @@ void ClientBegin( int clientNum ) { // If there are ghosts already then spawn as a ghost because // the game is already in progress. - if ( (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) ) + if ( !level.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) ) { G_StartGhosting ( ent ); } @@ -1554,6 +1561,7 @@ void ClientSpawn(gentity_t *ent) VectorCopy (playerMaxs, ent->r.maxs); client->ps.clientNum = index; + ent->s.number = index; // Bring back the saved firemodes memcpy ( client->ps.firemode, client->pers.firemode, sizeof(client->ps.firemode) ); @@ -1566,7 +1574,7 @@ void ClientSpawn(gentity_t *ent) // Give the client their weapons depending on whether or not pickups are enabled if ( level.pickupsDisabled ) { - G_UpdateOutfitting ( ent->s.number ); + G_UpdateOutfitting ( index ); // Prevent the client from picking up a whole bunch of stuff client->ps.pm_flags |= PMF_LIMITED_INVENTORY; @@ -1659,6 +1667,10 @@ void ClientSpawn(gentity_t *ent) client->ps.torsoAnim = -1; client->ps.legsAnim = LEGS_IDLE; + client->ps.weaponAnimIdChoice = 0; + client->ps.weaponCallbackStep = 0; + client->ps.weaponCallbackTime = 0; + // Not on a ladder client->ps.ladder = -1; @@ -1670,6 +1682,12 @@ void ClientSpawn(gentity_t *ent) MoveClientToIntermission( ent ); } + // Frozen? + if ( level.gametypeDelayTime > level.time ) + { + ent->client->ps.stats[STAT_FROZEN] = level.gametypeDelayTime - level.time; + } + // run a client frame to drop exactly to the floor, // initialize animations and other things client->ps.commandTime = level.time - 100; @@ -1690,12 +1708,6 @@ void ClientSpawn(gentity_t *ent) // clear entity state values BG_PlayerStateToEntityState( &client->ps, &ent->s, qtrue ); - // Frozen? - if ( level.gametypeDelayTime > level.time ) - { - ent->client->ps.stats[STAT_FROZEN] = level.gametypeDelayTime - level.time; - } - // Handle a deferred name change if ( client->pers.deferredname[0] ) { @@ -1901,3 +1913,51 @@ gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentit return NULL; } + +/* +=========== +G_IgnoreClientChat + +Instructs all chat to be ignored by the given +============ +*/ +void G_IgnoreClientChat ( int ignorer, int ignoree, qboolean ignore ) +{ + // Cant ignore yourself + if ( ignorer == ignoree ) + { + return; + } + + // If there is no client connected then dont bother + if ( g_entities[ignoree].client->pers.connected != CON_CONNECTED ) + { + return; + } + + if ( ignore ) + { + g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] |= (1<<(ignorer%32)); + } + else + { + g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] &= ~(1<<(ignorer%32)); + } +} + +/* +=========== +G_IsClientChatIgnored + +Checks to see if the given client is being ignored by a specific client +============ +*/ +qboolean G_IsClientChatIgnored ( int ignorer, int ignoree ) +{ + if ( g_entities[ignoree].client->sess.chatIgnoreClients[ignorer/32] & (1<<(ignorer%32)) ) + { + return qtrue; + } + + return qfalse; +} diff --git a/code/game/g_cmds.c b/code/game/g_cmds.c index e12436c..e47aeac 100644 --- a/code/game/g_cmds.c +++ b/code/game/g_cmds.c @@ -288,7 +288,7 @@ void Cmd_DropItem_f ( gentity_t* ent ) return; } - G_DropGametypeItems ( ent ); + G_DropGametypeItems ( ent, 3000 ); } /* @@ -753,6 +753,9 @@ void SetTeam( gentity_t *ent, char *s, const char* identity ) client->sess.spectatorState = specState; client->sess.spectatorClient = specClient; + // Kill any child entities of this client to protect against grenade team changers + G_FreeEnitityChildren ( ent ); + // Always spawn into a ctf game using a respawn timer. if ( team != TEAM_SPECTATOR && level.gametypeData->respawnType == RT_INTERVAL ) { @@ -767,7 +770,7 @@ void SetTeam( gentity_t *ent, char *s, const char* identity ) { // If there are ghosts already then spawn as a ghost because // the game is already in progress. - if ( (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) || noOutfittingChange || client->sess.noTeamChange ) + if ( !level.warmupTime && (level.gametypeJoinTime && (level.time - level.gametypeJoinTime) > (g_roundjointime.integer * 1000)) || noOutfittingChange || client->sess.noTeamChange ) { ghost = qtrue; } @@ -903,19 +906,6 @@ void G_StopFollowing( gentity_t *ent ) ent->client->ps.persistant[PERS_TEAM] = ent->client->sess.team; ent->r.svFlags &= ~SVF_BOT; - // Ghots dont really become spectators, just psuedo spectators - if ( ent->client->sess.ghost ) - { - // Do a start and stop to ensure the variables are all set properly - G_StopGhosting ( ent ); - G_StartGhosting ( ent ); - } - else - { - ent->client->sess.team = TEAM_SPECTATOR; - ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR; - } - // If we were in fact following someone, then make the angles and origin nice for // when we stop if ( ent->client->sess.spectatorClient != -1 ) @@ -928,7 +918,7 @@ void G_StopFollowing( gentity_t *ent ) ent->client->ps.delta_angles[i] = ANGLE2SHORT(cl->ps.viewangles[i] - SHORT2ANGLE(ent->client->pers.cmd.angles[i])); } - VectorCopy ( cl->ps.viewangles, ent->client->ps.viewangles ); + VectorCopy ( cl->ps.viewangles, ent->client->ps.viewangles ); VectorCopy ( cl->ps.origin, ent->client->ps.origin ); VectorClear ( ent->client->ps.velocity ); ent->client->ps.movementDir = 0; @@ -936,7 +926,18 @@ void G_StopFollowing( gentity_t *ent ) BG_PlayerStateToEntityState( &ent->client->ps, &ent->s, qtrue ); } - ent->client->sess.spectatorClient = -1; + // Ghots dont really become spectators, just psuedo spectators + if ( ent->client->sess.ghost ) + { + // Do a start and stop to ensure the variables are all set properly + G_StopGhosting ( ent ); + G_StartGhosting ( ent ); + } + else + { + ent->client->sess.team = TEAM_SPECTATOR; + ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR; + } } /* @@ -1186,6 +1187,11 @@ static void G_SayTo( gentity_t *ent, gentity_t *other, int mode, const char *nam return; } + if ( ent->client->sess.muted || G_IsClientChatIgnored ( other->s.number, ent->s.number ) ) + { + return; + } + if ( !level.intermissiontime && !level.intermissionQueued ) { // Spectators cant talk to alive people @@ -1674,7 +1680,7 @@ void Cmd_CallVote_f( gentity_t *ent ) trap_SendServerCommand( ent-g_entities, va("print \"You are not allowed to vote within %d minute of a failed vote.\n\"", g_failedVoteDelay.integer ) ); return; } - + // Save the voting client id level.voteClient = ent->s.number; @@ -1737,6 +1743,12 @@ void Cmd_CallVote_f( gentity_t *ent ) } else if ( !Q_stricmp( arg1, "map" ) ) { + if ( !G_DoesMapExist ( arg2 ) ) + { + trap_SendServerCommand( ent-g_entities, "print \"Unknown mapname.\n\"" ); + return; + } + Com_sprintf( level.voteString, sizeof( level.voteString ), "%s %s", arg1, arg2 ); Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString ); } @@ -1749,7 +1761,7 @@ void Cmd_CallVote_f( gentity_t *ent ) trap_Argv( 4, arg4, sizeof( arg4 ) ); Com_sprintf( level.voteString, sizeof( level.voteString ), "rmgmap 1 %s 2 %s 3 %s 4 \"%s\" 0", arg2, arg3, arg4, ConcatArgs ( 5 ) ); - Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString ); + Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "Randomly Generated Map" ); } else if ( !Q_stricmp( arg1, "mapcycle" ) ) { @@ -1823,9 +1835,19 @@ void Cmd_CallVote_f( gentity_t *ent ) trap_SendServerCommand( ent-g_entities, va("print \"This server does not allow time extensions.\n\"") ); return; } + Com_sprintf ( level.voteString, sizeof(level.voteString ), "extendtime %d", g_timeextension.integer ); Com_sprintf ( level.voteDisplayString, sizeof(level.voteDisplayString), "extend timelimit by %d minutes", g_timeextension.integer ); } + else if ( !Q_stricmp ( arg1, "timelimit" ) || + !Q_stricmp ( arg1, "scorelimit" ) || + !Q_stricmp ( arg1, "map_restart" ) || + !Q_stricmp ( arg1, "g_doWarmup" ) || + !Q_stricmp ( arg1, "g_friendlyfire" ) ) + { + Com_sprintf ( level.voteString, sizeof(level.voteString ), "%s %d", arg1, atoi(arg2) ); + Com_sprintf( level.voteDisplayString, sizeof( level.voteDisplayString ), "%s", level.voteString ); + } else { Com_sprintf( level.voteString, sizeof( level.voteString ), "%s \"%s\"", arg1, arg2 ); @@ -1900,6 +1922,39 @@ void Cmd_Vote_f( gentity_t *ent ) // for players entering or leaving } +/* +================= +Cmd_Ignore_f +================= +*/ +void Cmd_Ignore_f( gentity_t *ent ) +{ + char buffer[MAX_TOKEN_CHARS]; + int ignoree; + qboolean ignore; + + trap_Argv( 1, buffer, sizeof( buffer ) ); + + ignoree = atoi( buffer ); + ignore = G_IsClientChatIgnored ( ent->s.number, ignoree ) ? qfalse : qtrue; + + if ( ignoree == ent->s.number ) + { + trap_SendServerCommand( ent-g_entities, va("print \"cant ignore yourself.\n\"")); + return; + } + + G_IgnoreClientChat ( ent->s.number, ignoree, ignore); + + if ( ignore ) + { + trap_SendServerCommand( ent-g_entities, va("print \"%s ignored.\n\"", g_entities[ignoree].client->pers.netname)); + } + else + { + trap_SendServerCommand( ent-g_entities, va("print \"%s unignored.\n\"", g_entities[ignoree].client->pers.netname)); + } +} /* ================= @@ -2030,6 +2085,8 @@ void ClientCommand( int clientNum ) { Cmd_Vote_f (ent); else if (Q_stricmp (cmd, "setviewpos") == 0) Cmd_SetViewpos_f( ent ); + else if (Q_stricmp ( cmd, "ignore" ) == 0 ) + Cmd_Ignore_f ( ent ); #ifdef _SOF2_BOTS else if (Q_stricmp (cmd, "addbot") == 0) diff --git a/code/game/g_combat.c b/code/game/g_combat.c index 85f8637..51dfd7c 100644 --- a/code/game/g_combat.c +++ b/code/game/g_combat.c @@ -67,7 +67,7 @@ void TossClientItems( gentity_t *self ) G_DropWeapon ( self, weapon, 0 ); } - G_DropGametypeItems ( self ); + G_DropGametypeItems ( self, 0 ); } /* @@ -115,6 +115,7 @@ char *modNames[] = "MOD_M1911A1_PISTOL", "MOD_US_SOCOM_PISTOL", + "MOD_SILVER_TALON", "MOD_M590_SHOTGUN", "MOD_MICRO_UZI_SUBMACHINEGUN", @@ -124,6 +125,7 @@ char *modNames[] = "MOD_USAS_12_SHOTGUN", "MOD_M4_ASSAULT_RIFLE", "MOD_AK74_ASSAULT_RIFLE", + "MOD_SIG551", "MOD_MSG90A1_SNIPER_RIFLE", "MOD_M60_MACHINEGUN", "MOD_MM1_GRENADE_LAUNCHER", @@ -246,7 +248,12 @@ void player_die( { gentity_t* missile; missile = G_FireWeapon( self, ATTACK_NORMAL ); - missile->dflags |= DAMAGE_NO_TEAMKILL; + + if ( attacker && attacker->client && attacker->client->sess.team != self->client->sess.team ) + { + missile->dflags |= DAMAGE_NO_TEAMKILL; + } + if ( missile ) { VectorClear ( missile->s.pos.trDelta ); @@ -879,7 +886,7 @@ int G_Damage ( // if the attacker was on the same team if ( targ != attacker && OnSameTeam (targ, attacker) ) { - if ( !g_friendlyFire.integer ) + if ( !g_friendlyFire.integer || level.warmupTime ) { return 0; } @@ -920,6 +927,17 @@ int G_Damage ( { int actualtake = Com_Clamp ( 0, targ->health, take ); + if ( targ->client->ps.stats[STAT_GAMETYPE_ITEMS] ) + { + actualtake *= 2; + } + + // See if this damage falls into the no excuse damage + if ( level.gametypeData->respawnType == RT_NONE && level.time - level.gametypeDelayTime < g_teamkillNoExcuseTime.integer * 1000 ) + { + actualtake *= g_teamkillNoExcuseMultiplier.integer; + } + attacker->client->sess.teamkillDamage += actualtake; attacker->client->sess.teamkillForgiveTime = level.time; } @@ -1027,7 +1045,7 @@ int G_Damage ( } // Friendly fire - if ( g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) ) + if ( !level.warmupTime && g_friendlyFire.integer && targ != attacker && OnSameTeam ( targ, attacker ) ) { vec3_t diff; @@ -1333,7 +1351,10 @@ qboolean G_RadiusDamage ( if ( d && ent->client ) { // Only one of the grenade hits will count for tk damage - dflags |= DAMAGE_NO_TEAMKILL; + if ( ent != attacker ) + { + dflags |= DAMAGE_NO_TEAMKILL; + } // Put some procedural gore on the target. tent = G_TempEntity( origin, EV_EXPLOSION_HIT_FLESH ); diff --git a/code/game/g_gametype.c b/code/game/g_gametype.c index 11f0bc0..ca7df37 100644 --- a/code/game/g_gametype.c +++ b/code/game/g_gametype.c @@ -285,7 +285,7 @@ void G_ResetGametypeEntities ( void ) G_RespawnClients =============== */ -void G_RespawnClients ( qboolean force, team_t team ) +void G_RespawnClients ( qboolean force, team_t team, qboolean fullRestart ) { int i; @@ -339,6 +339,16 @@ void G_RespawnClients ( qboolean force, team_t team ) trap_UnlinkEntity (ent); ClientSpawn ( ent ); + + if ( fullRestart ) + { + ent->client->sess.score = 0; + ent->client->sess.kills = 0; + ent->client->sess.deaths = 0; + ent->client->sess.teamkillDamage = 0; + ent->client->sess.teamkillForgiveTime = 0; + ent->client->pers.enterTime = level.time; + } } } @@ -422,7 +432,7 @@ void G_ResetEntities ( void ) G_ResetGametype =============== */ -void G_ResetGametype ( void ) +void G_ResetGametype ( qboolean fullRestart ) { gentity_t* tent; @@ -435,6 +445,13 @@ void G_ResetGametype ( void ) // Reset the gametype itself G_ResetGametypeEntities ( ); + // Cant have a 0 roundtimelimit + if ( g_roundtimelimit.integer < 1 ) + { + trap_Cvar_Set ( "g_roundtimelimit", "1" ); + trap_Cvar_Update ( &g_roundtimelimit ); + } + // Initialize the respawn interval since this is a interval gametype switch ( level.gametypeData->respawnType ) { @@ -446,7 +463,7 @@ void G_ResetGametype ( void ) case RT_NONE: level.gametypeDelayTime = level.time + g_roundstartdelay.integer * 1000; - level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000); + level.gametypeRoundTime = level.time + (g_roundtimelimit.integer * 60000) + g_roundstartdelay.integer * 1000; if ( level.gametypeDelayTime != level.time ) { @@ -466,12 +483,21 @@ void G_ResetGametype ( void ) } // Respawn all clients - G_RespawnClients ( qtrue, TEAM_RED ); - G_RespawnClients ( qtrue, TEAM_BLUE ); + G_RespawnClients ( qtrue, TEAM_RED, fullRestart ); + G_RespawnClients ( qtrue, TEAM_BLUE, fullRestart ); level.gametypeStartTime = level.time; level.gametypeResetTime = 0; + if ( fullRestart ) + { + level.warmupTime = 0; + level.startTime = level.time; + memset ( level.teamScores, 0, sizeof(level.teamScores) ); + trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) ); + trap_SetConfigstring( CS_LEVEL_START_TIME, va("%i", level.startTime ) ); + } + // Reset the clients local effects tent = G_TempEntity( vec3_origin, EV_GAMETYPE_RESTART ); tent->r.svFlags |= SVF_BROADCAST; @@ -615,7 +641,7 @@ G_DropGametypeItems Drops all of the gametype items held by the player ================= */ -void G_DropGametypeItems ( gentity_t* self ) +void G_DropGametypeItems ( gentity_t* self, int delayPickup ) { float angle; int i; @@ -642,9 +668,12 @@ void G_DropGametypeItems ( gentity_t* self ) drop->count = 1; angle += 45; - drop->nextthink = level.time + 3000; - drop->s.eFlags |= EF_NOPICKUP; - drop->think = G_EnableGametypeItemPickup; + if ( delayPickup ) + { + drop->nextthink = level.time + delayPickup; + drop->s.eFlags |= EF_NOPICKUP; + drop->think = G_EnableGametypeItemPickup; + } // TAke it away from the client just in case self->client->ps.stats[STAT_GAMETYPE_ITEMS] &= ~(1<client->sess.team]++; + level.teamAliveCount[other->client->sess.team]++; } - if ( counts[TEAM_RED] || counts[TEAM_BLUE] ) + if ( level.teamAliveCount[TEAM_RED] || level.teamAliveCount[TEAM_BLUE] || level.teamAliveCount[TEAM_FREE] ) { - G_ResetGametype ( ); + G_ResetGametype ( qfalse ); return; } } @@ -712,7 +740,7 @@ void CheckGametype ( void ) // Dont do this again level.gametypeResetTime = 0; - G_ResetGametype ( ); + G_ResetGametype ( qfalse ); } return; @@ -727,7 +755,7 @@ void CheckGametype ( void ) if ( level.gametypeRespawnTime[team] && level.time > level.gametypeRespawnTime[team] ) { // Respawn all dead clients - G_RespawnClients ( qfalse, team ); + G_RespawnClients ( qfalse, team, qfalse ); // Next interval level.gametypeRespawnTime[team] = 0; @@ -736,13 +764,12 @@ void CheckGametype ( void ) } // If we are in RT_NONE respawn mode then we need to look for everyone being dead - if ( level.time > level.gametypeDelayTime && level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime ) + if ( level.gametypeData->respawnType == RT_NONE && level.gametypeStartTime ) { int i; - int alive[TEAM_NUM_TEAMS]; int dead[TEAM_NUM_TEAMS]; - memset ( &alive[0], 0, sizeof(alive) ); + memset ( &level.teamAliveCount[0], 0, sizeof(level.teamAliveCount) ); memset ( &dead[0], 0, sizeof(dead) ); for ( i = 0; i < level.numConnectedClients; i ++ ) { @@ -759,26 +786,29 @@ void CheckGametype ( void ) } else { - alive[ent->client->sess.team] ++; + level.teamAliveCount[ent->client->sess.team] ++; } } - // If everyone is dead on a team then reset the gametype, but only if - // there was someone on that team to begin with. - if ( !alive[TEAM_RED] && dead[TEAM_RED] ) - { - trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_RED, 0, 0, 0, 0 ); - } - else if ( !alive[TEAM_BLUE] && dead[TEAM_BLUE] ) - { - trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_BLUE, 0, 0, 0, 0 ); - } - - // See if the time has expired - if ( level.time > level.gametypeRoundTime ) + if ( level.time > level.gametypeDelayTime ) { - trap_GT_SendEvent ( GTEV_TIME_EXPIRED, level.time, 0, 0, 0, 0, 0 ); - } + // If everyone is dead on a team then reset the gametype, but only if + // there was someone on that team to begin with. + if ( !level.teamAliveCount[TEAM_RED] && dead[TEAM_RED] ) + { + trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_RED, 0, 0, 0, 0 ); + } + else if ( !level.teamAliveCount[TEAM_BLUE] && dead[TEAM_BLUE] ) + { + trap_GT_SendEvent ( GTEV_TEAM_ELIMINATED, level.time, TEAM_BLUE, 0, 0, 0, 0 ); + } + + // See if the time has expired + if ( level.time > level.gametypeRoundTime ) + { + trap_GT_SendEvent ( GTEV_TIME_EXPIRED, level.time, 0, 0, 0, 0, 0 ); + } + } } } @@ -796,7 +826,7 @@ int G_GametypeCommand ( int cmd, int arg0, int arg1, int arg2, int arg3, int arg case GTCMD_RESTART: if ( arg0 <= 0 ) { - G_ResetGametype ( ); + G_ResetGametype ( qfalse ); } else { diff --git a/code/game/g_items.c b/code/game/g_items.c index daa5a09..315eb0f 100644 --- a/code/game/g_items.c +++ b/code/game/g_items.c @@ -298,6 +298,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) int respawn; qboolean predict; qboolean autoswitch; + int eventID; if (!other->client) return; @@ -362,19 +363,25 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) return; } - if ( !respawn ) + if ( !respawn && !(ent->flags & FL_DROPPED_ITEM) ) { return; } + eventID = EV_ITEM_PICKUP; + if ( other->client && (other->client->ps.pm_flags & PMF_DUCKED ) ) + { + eventID = EV_ITEM_PICKUP_QUIET; + } + // play the normal pickup sound if (predict) { - G_AddPredictableEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) ); + G_AddPredictableEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) ); } else { - G_AddEvent( other, EV_ITEM_PICKUP, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) ); + G_AddEvent( other, eventID, ent->s.modelindex | (autoswitch?ITEM_AUTOSWITCHBIT:0) ); } // fire item targets @@ -610,6 +617,12 @@ gentity_t* G_DropWeapon ( gentity_t* ent, weapon_t weapon, int pickupDelay ) return NULL; } + // Make sure they have the weapon + if ( !(ent->client->ps.stats[STAT_WEAPONS] & (1<client->noOutfittingChange = qtrue; @@ -847,11 +860,28 @@ void SaveRegisteredItems( void ) G_ItemDisabled ============ */ -int G_ItemDisabled( gitem_t *item ) +qboolean G_ItemDisabled( gitem_t *item ) { char name[128]; + int val; Com_sprintf(name, sizeof(name), "disable_%s", item->classname); - return trap_Cvar_VariableIntegerValue( name ); + + val = trap_Cvar_VariableIntegerValue( name ); + + if ( !val ) + { + return qfalse; + } + + if ( val == 2 ) + { + if ( !level.gametypeData->pickupsDisabled ) + { + return qfalse; + } + } + + return qtrue; } /* diff --git a/code/game/g_local.h b/code/game/g_local.h index 2495792..588b188 100644 --- a/code/game/g_local.h +++ b/code/game/g_local.h @@ -188,6 +188,7 @@ typedef enum SPECTATOR_NOT, SPECTATOR_FREE, SPECTATOR_FOLLOW, + SPECTATOR_FOLLOWFIRST, SPECTATOR_SCOREBOARD } spectatorState_t; @@ -233,6 +234,7 @@ typedef struct team_t team; // current team int spectatorTime; // for determining next-in-line to play spectatorState_t spectatorState; + qboolean spectatorFirstPerson; // First person following? int spectatorClient; // for chasecam and follow mode int score; // total score int kills; // number of kills @@ -241,6 +243,8 @@ typedef struct int teamkillDamage; // amount of damage death to teammates int teamkillForgiveTime; // time when team damage will be forgivin qboolean noTeamChange; // cant change teams when this is true (rt_none only) + int chatIgnoreClients[2]; // Clients which are ignoring this client. [0] = (0-31) [1] = (32-63) + qboolean muted; } clientSession_t; @@ -362,7 +366,7 @@ struct gclient_s int voiceFloodTimer; // Timer used to forgive voice chat flooding int voiceFloodCount; // Amount of voice chats that need to be forgivin int voiceFloodPenalty; // Time when a client can voice chat again - + // Anti-lag information gantilag_t antilag[MAX_ANTILAG]; gantilag_t antilagUndo; @@ -424,6 +428,7 @@ typedef struct int globalVoiceTime; // last global voice int teamScores[TEAM_NUM_TEAMS]; + int teamAliveCount[TEAM_NUM_TEAMS]; int lastTeamLocationTime; // last time of client team location update qboolean newSession; // don't use any old session data, because @@ -607,6 +612,7 @@ void G_Sound( gentity_t *ent, int channel, int soundIndex ); void G_SoundAtLoc( vec3_t loc, int channel, int soundIndex ); void G_EntitySound( gentity_t *ent, int channel, int soundIndex ); void G_FreeEntity( gentity_t *e ); +void G_FreeEnitityChildren( gentity_t* ent ); qboolean G_EntitiesFree( void ); void G_TouchTriggers (gentity_t *ent); @@ -747,6 +753,8 @@ void G_UpdateClientAnimations ( gentity_t* ent ); void G_SetRespawnTimer ( gentity_t* ent ); gentity_t* G_FindNearbyClient ( vec3_t origin, team_t team, float radius, gentity_t* ignore ); void G_AddClientSpawn ( gentity_t* ent, team_t team ); +qboolean G_IsClientChatIgnored ( int ignorer, int ingnoree ); +void G_IgnoreClientChat ( int ignorer, int ignoree, qboolean ignore ); // // g_svcmds.c @@ -826,7 +834,8 @@ qboolean G_BotConnect( int clientNum, qboolean restart ); void Svcmd_AddBot_f( void ); void Svcmd_BotList_f( void ); void BotInterbreedEndMatch( void ); -qboolean G_DoesMapSupportGametype ( const char* gametype ); +qboolean G_DoesMapSupportGametype ( const char* gametype ); +qboolean G_DoesMapExist ( const char* mapname ); void G_LoadArenas ( void ); // @@ -837,11 +846,11 @@ gentity_t* G_SpawnGametypeItem ( const char* pickup_name, qboolean dropped, gentity_t* G_SelectRandomGametypeSpawnPoint ( team_t team ); qboolean G_ParseGametypeFile ( void ); qboolean G_ExecuteGametypeScript ( gentity_t* activator, const char* name ); -void G_ResetGametype ( void ); +void G_ResetGametype ( qboolean fullRestart ); qboolean G_CanGametypeTriggerBeUsed ( gentity_t* self, gentity_t* activator ); void G_ResetGametypeItem ( gitem_t* item ); void gametype_item_use ( gentity_t* self, gentity_t* other ); -void G_DropGametypeItems ( gentity_t* self ); +void G_DropGametypeItems ( gentity_t* self, int delayPickup ); // ai_main.c #define MAX_FILEPATH 144 @@ -928,6 +937,8 @@ extern vmCvar_t g_teamkillPenalty; extern vmCvar_t g_teamkillDamageMax; extern vmCvar_t g_teamkillDamageForgive; extern vmCvar_t g_teamkillBanTime; +extern vmCvar_t g_teamkillNoExcuseTime; +extern vmCvar_t g_teamkillNoExcuseMultiplier; extern vmCvar_t g_voiceFloodCount; extern vmCvar_t g_voiceFloodPenalty; extern vmCvar_t g_voiceTalkingGhosts; diff --git a/code/game/g_main.c b/code/game/g_main.c index 4059101..908d893 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -79,6 +79,8 @@ vmCvar_t g_teamkillPenalty; // Amount of score added for killing a teammates vmCvar_t g_teamkillDamageMax; // max damage one can do to teammates before being kicked vmCvar_t g_teamkillDamageForgive; // amount of teamkill damage forgiven each minute vmCvar_t g_teamkillBanTime; // number of minutes to ban someone for after being kicked +vmCvar_t g_teamkillNoExcuseTime; // number of seconds into a round where tk damage is inexcusable +vmCvar_t g_teamkillNoExcuseMultiplier; // multipier for tk damage that is inexcusable vmCvar_t g_voiceFloodCount; // Number of voice messages in one minute to be concidered flooding vmCvar_t g_voiceFloodPenalty; // Amount of time a void flooder must wait before they can use voice again vmCvar_t g_suddenDeath; @@ -166,7 +168,28 @@ static cvarTable_t gameCvarTable[] = { &g_roundstartdelay, "g_roundstartdelay", "5", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse }, - { &g_availableWeapons, "g_availableWeapons", "22222222222211", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { &g_availableWeapons, "g_availableWeapons", "0", CVAR_SERVERINFO|CVAR_ROM|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + + { NULL, "disable_weapon_knife", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_US_SOCOM", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_M19", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_silvertalon", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_microuzi", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_M3A1", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_MP5", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_USAS_12", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_M590", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_MSG90A1", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_M4", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_AK_74", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_SIG551", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_M60", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_RPG_7", "2", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_MM_1", "2", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_M84", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_SMOHG92", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_AN_M14", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, + { NULL, "disable_pickup_weapon_M15", "0", CVAR_ARCHIVE|CVAR_LATCH, 0.0, 0.0, 0, qfalse }, { &g_forceFollow, "g_forceFollow", "0", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse }, { &g_followEnemy, "g_followEnemy", "1", CVAR_ARCHIVE, 0.0, 0.0, 0, qfalse }, @@ -180,10 +203,12 @@ static cvarTable_t gameCvarTable[] = { &g_voiceFloodCount, "g_voiceFloodCount", "6", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { &g_voiceFloodPenalty, "g_voiceFloodPenalty", "60", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, - { &g_teamkillPenalty, "g_teamkillPenalty", "-1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, - { &g_teamkillDamageMax, "g_teamkillDamageMax", "300", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, - { &g_teamkillDamageForgive, "g_teamkillDamageForgive", "50", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, - { &g_teamkillBanTime, "g_teamkillBanTime", "5", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, + { &g_teamkillPenalty, "g_teamkillPenalty", "-1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, + { &g_teamkillDamageMax, "g_teamkillDamageMax", "300", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, + { &g_teamkillDamageForgive, "g_teamkillDamageForgive", "50", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, + { &g_teamkillBanTime, "g_teamkillBanTime", "5", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, + { &g_teamkillNoExcuseTime, "g_teamkillNoExcuseTime", "8", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, + { &g_teamkillNoExcuseMultiplier, "g_teamkillNoExcuseMultiplier", "3", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { &g_suddenDeath, "g_suddenDeath", "1", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, @@ -417,6 +442,47 @@ void G_UpdateCvars( void ) } } +/* +=============== +G_UpdateAvailableWeapons + +Updates the g_availableWeapons cvar using the disable cvars. +=============== +*/ +void G_UpdateAvailableWeapons ( void ) +{ + weapon_t weapon; + char available[WP_NUM_WEAPONS+1]; + + memset ( available, 0, sizeof(available) ); + + for ( weapon = WP_KNIFE; weapon < WP_NUM_WEAPONS; weapon ++ ) + { + gitem_t* item = BG_FindWeaponItem ( weapon ); + if ( !item ) + { + continue; + } + + switch ( (int)trap_Cvar_VariableValue ( va("disable_%s", item->classname ) ) ) + { + case 0: + available[weapon-1] = '2'; + break; + + case 1: + available[weapon-1] = '0'; + break; + + case 2: + available[weapon-1] = '1'; + break; + } + } + + trap_Cvar_Set ( "g_availableWeapons", available ); +} + /* =============== G_SetGametype @@ -512,6 +578,9 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) // Set the current gametype G_SetGametype(g_gametype.string); + // Sets the available weapons cvar from the disable_ cvars. + G_UpdateAvailableWeapons ( ); + // Set the available outfitting BG_SetAvailableOutfitting ( g_availableWeapons.string ); @@ -1362,15 +1431,18 @@ void CheckExitRules( void ) // Check to see if the timelimit was hit if ( g_timelimit.integer && !level.warmupTime ) { - if ( level.time - level.startTime >= (g_timelimit.integer + level.timeExtension)*60000 ) + if ( level.gametypeData->respawnType != RT_NONE || level.gametypeResetTime ) { - gentity_t* tent; - tent = G_TempEntity( vec3_origin, EV_GAME_OVER ); - tent->s.eventParm = GAME_OVER_TIMELIMIT; - tent->r.svFlags = SVF_BROADCAST; + if ( level.time - level.startTime >= (g_timelimit.integer + level.timeExtension)*60000 ) + { + gentity_t* tent; + tent = G_TempEntity( vec3_origin, EV_GAME_OVER ); + tent->s.eventParm = GAME_OVER_TIMELIMIT; + tent->r.svFlags = SVF_BROADCAST; - LogExit( "Timelimit hit." ); - return; + LogExit( "Timelimit hit." ); + return; + } } } @@ -1509,10 +1581,12 @@ void CheckWarmup ( void ) // if the warmup time has counted down, restart if ( level.time > level.warmupTime ) { - level.warmupTime += 10000; - trap_Cvar_Set( "g_restarted", "1" ); - trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" ); - level.restarted = qtrue; +// level.warmupTime += 10000; +// trap_Cvar_Set( "g_restarted", "1" ); + + G_ResetGametype ( qtrue ); +// trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" ); +// level.restarted = qtrue; return; } } diff --git a/code/game/g_missile.c b/code/game/g_missile.c index 9d4dcce..7d29df2 100644 --- a/code/game/g_missile.c +++ b/code/game/g_missile.c @@ -119,7 +119,7 @@ void G_ExplodeMissile( gentity_t *ent ) { if (ent->dflags & DAMAGE_AREA_DAMAGE) { // do damage over time rather than instantly - G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.05f,ent->splashRadius, 8000,ent->methodOfDeath ); + G_CreateDamageArea ( ent->r.currentOrigin, ent->parent, ent->splashDamage*0.06f,ent->splashRadius, 8000,ent->methodOfDeath ); // do some instant damage G_RadiusDamage( ent->r.currentOrigin, ent->parent, ent->damage, ent->splashRadius, ent, @@ -443,7 +443,7 @@ void G_MissileImpact( gentity_t *ent, trace_t *trace ) if (ent->dflags & DAMAGE_AREA_DAMAGE) { // do damage over time rather than instantly - G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.10f,ent->splashRadius*2, 8000,ent->methodOfDeath ); + G_CreateDamageArea ( trace->endpos, ent->parent, ent->splashDamage*0.06f,ent->splashRadius*2, 8000,ent->methodOfDeath ); // do some instant damage G_RadiusDamage( trace->endpos, ent->parent, ent->damage, ent->splashRadius, other, @@ -554,21 +554,13 @@ void G_RunMissile( gentity_t *ent ) if ( tr.fraction != 1 ) { // Hit the sky or moving through something - if ( tr.surfaceFlags & SURF_NOIMPACT ) + if ( (tr.surfaceFlags & SURF_NOIMPACT) && (tr.surfaceFlags & SURF_SKY) ) { // Dont kill a missle that hits the sky and has gravity - if ( tr.surfaceFlags & SURF_SKY ) - { - ent->s.eFlags |= EF_INSKY; - ent->r.svFlags |= SVF_BROADCAST; - VectorCopy ( origin, ent->r.currentOrigin ); - trap_LinkEntity( ent ); - } - else - { - G_FreeEntity( ent ); - return; - } + ent->s.eFlags |= EF_INSKY; + ent->r.svFlags |= SVF_BROADCAST; + VectorCopy ( origin, ent->r.currentOrigin ); + trap_LinkEntity( ent ); } else { diff --git a/code/game/g_public.h b/code/game/g_public.h index b4f2286..c3de63c 100644 --- a/code/game/g_public.h +++ b/code/game/g_public.h @@ -24,7 +24,10 @@ #define SVF_GLASS_BRUSH 0x08000000 // Ent is a glass brush -#define SVF_DOUBLED_BBOX 0x00001000 // Bounding box has been doubled +#define SVF_INFLATED_BBOX 0x00001000 // Bounding box has been doubled +#define SVF_LINKHACK 0x10000000 // Hack to link an entity into extra clusters +#define SVF_DETAIL 0x20000000 // Entity is a detail entity and can be dropped from the snapshot +#define SVF_SKIP 0x80000000 // Dont include this entity in the current snapshot (internal use only) //=============================================================== @@ -63,6 +66,8 @@ typedef struct { // by the second array index. int broadcastClients[2]; + int detailTime; + } entityShared_t; diff --git a/code/game/g_spawn.c b/code/game/g_spawn.c index 15c1248..c1df942 100644 --- a/code/game/g_spawn.c +++ b/code/game/g_spawn.c @@ -261,6 +261,7 @@ spawn_t spawns[] = {"pickup_ammo", 0}, {"script_runner", 0}, {"trigger_arioche_objective", 0}, + {"func_brushmodel_child", 0}, {0, 0} }; @@ -1017,7 +1018,7 @@ void SP_worldspawn( void ) trap_SetConfigstring( CS_MOTD, g_motd.string ); // message of the day - G_SpawnString( "gravity", "800", &text ); + G_SpawnString( "gravity", va("%d", g_gravity.integer), &text ); trap_Cvar_Set( "g_gravity", text ); // Handle all the worldspawn stuff common to both main bsp and sub bsp diff --git a/code/game/g_svcmds.c b/code/game/g_svcmds.c index 03b343d..a20452b 100644 --- a/code/game/g_svcmds.c +++ b/code/game/g_svcmds.c @@ -103,6 +103,44 @@ void Svcmd_AutoKickList_f ( void ) } } +void Svcmd_Mute_f ( void ) +{ + char str[MAX_TOKEN_CHARS]; + int clientnum; + + if ( trap_Argc() < 2 ) + { + Com_Printf("Usage: mute \n"); + return; + } + + trap_Argv( 1, str, sizeof( str ) ); + clientnum = atoi ( str ); + + if ( clientnum < 0 || clientnum > MAX_CLIENTS ) + { + Com_Printf("invalid client id\n"); + return; + } + + if ( level.clients[clientnum].pers.connected != CON_CONNECTED ) + { + Com_Printf("no client connected with that client id\n" ); + return; + } + + level.clients[clientnum].sess.muted = level.clients[clientnum].sess.muted ? qfalse : qtrue; + + if ( level.clients[clientnum].sess.muted ) + { + Com_Printf("client %d muted\n", clientnum ); + } + else + { + Com_Printf("client %d unmuted\n", clientnum ); + } +} + gclient_t *ClientForString( const char *s ) { gclient_t *cl; int i; @@ -228,7 +266,8 @@ qboolean ConsoleCommand( void ) if (Q_stricmp (cmd, "gametype_restart" ) == 0 ) { - G_ResetGametype ( ); + trap_Argv( 1, cmd, sizeof( cmd ) ); + G_ResetGametype ( Q_stricmp ( cmd, "full" ) == 0 ); return qtrue; } @@ -244,6 +283,12 @@ qboolean ConsoleCommand( void ) return qtrue; } + if ( Q_stricmp ( cmd, "mute" ) == 0 ) + { + Svcmd_Mute_f ( ); + return qtrue; + } + if (g_dedicated.integer) { if (Q_stricmp (cmd, "say") == 0) diff --git a/code/game/g_utils.c b/code/game/g_utils.c index b55f5c2..a8bdd62 100644 --- a/code/game/g_utils.c +++ b/code/game/g_utils.c @@ -518,6 +518,33 @@ void G_FreeEntity( gentity_t *ed ) ed->inuse = qfalse; } +/* +================= +G_FreeEnitityChildren + +Frees any entity that is a child of the given entity +================= +*/ +void G_FreeEnitityChildren( gentity_t* ent ) +{ + gentity_t* from; + + for ( from = g_entities; from < &g_entities[level.num_entities] ; from++) + { + if ( !from->inuse ) + { + continue; + } + + if ( from->parent != ent ) + { + continue; + } + + G_FreeEntity ( from ); + } +} + /* ================= G_TempEntity @@ -695,6 +722,7 @@ void G_SoundAtLoc( vec3_t loc, int channel, int soundIndex ) { te = G_TempEntity( loc, EV_GENERAL_SOUND ); te->s.eventParm = soundIndex; + te->r.svFlags |= SVF_BROADCAST; } /* diff --git a/code/game/g_weapon.c b/code/game/g_weapon.c index b35abfd..945ceca 100644 --- a/code/game/g_weapon.c +++ b/code/game/g_weapon.c @@ -210,6 +210,8 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack ) int i; vec3_t muzzlePoint; vec3_t fwd; + vec3_t right; + vec3_t up; vec3_t fireAngs; float damageMult; int hitcount; @@ -239,14 +241,14 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack ) inaccuracy = (float)ent->client->ps.inaccuracy / 1000.0f; if ( detailed ) { - if ( ent->client->ps.pm_flags & PMF_DUCKED ) - { - inaccuracy *= DUCK_ACCURACY_MODIFIER; - } - else if ( ent->client->ps.pm_flags & PMF_JUMPING ) + if ( ent->client->ps.pm_flags & PMF_JUMPING ) { inaccuracy *= JUMP_ACCURACY_MODIFIER; } + else if ( ent->client->ps.pm_flags & PMF_DUCKED ) + { + inaccuracy *= DUCK_ACCURACY_MODIFIER; + } } // Anti-lag @@ -258,18 +260,14 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack ) // Handle leaning VectorCopy(ent->client->ps.viewangles, fireAngs); + + AngleVectors( fireAngs, fwd, right, up); + if ( ent->client->ps.pm_flags & PMF_LEANING ) { - vec3_t right; - float leanOffset; - - leanOffset = (float)(ent->client->ps.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET; - AngleVectors( fireAngs, NULL, right, NULL ); - VectorMA( muzzlePoint, leanOffset, right, muzzlePoint ); + BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint ); } - AngleVectors( fireAngs, fwd, NULL, NULL ); - // Move the start trace back a bit to account for bumping up against someone VectorMA ( muzzlePoint, -15, fwd, muzzlePoint ); @@ -486,7 +484,7 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack ) if ( level.time - traceEnt->client->invulnerableTime >= g_respawnInvulnerability.integer * 1000 ) { // Shot my a teammate with ff off? - if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && !g_friendlyFire.integer ) ) ) + if ( !level.gametypeData->teams || (ent->client && !(OnSameTeam(ent,traceEnt) && (!g_friendlyFire.integer || level.warmupTime) ) ) ) { flesh = qtrue; } @@ -526,6 +524,8 @@ void G_FireBullet ( gentity_t* ent, int weapon, int attack ) tent->s.eventParm <<= MATERIAL_BITS; tent->s.eventParm |= (tr.surfaceFlags & MATERIAL_MASK); tent->s.time = weapon + ((attack&0xFF)<<8); + tent->r.detailTime = level.time + rand() % 1000; + tent->r.svFlags |= SVF_DETAIL; } tent->s.otherEntityNum = ent->s.number; @@ -601,12 +601,7 @@ gentity_t* G_FireProjectile ( gentity_t *ent, weapon_t weapon, attackType_t atta if ( ent->client->ps.pm_flags & PMF_LEANING ) { - float leanOffset; - - leanOffset = (float)(ent->client->ps.leanTime - LEAN_TIME) / LEAN_TIME * LEAN_OFFSET; - fireAngs[ROLL] += leanOffset / 4; - AngleVectors( fireAngs, NULL, right, NULL ); - VectorMA( muzzlePoint, leanOffset /* * 0.75f */, right, muzzlePoint ); + BG_ApplyLeanOffset ( &ent->client->ps, muzzlePoint ); } AngleVectors( fireAngs, fwd, right, up ); diff --git a/code/game/inv.h b/code/game/inv.h index ac353f7..6b7ad2f 100644 --- a/code/game/inv.h +++ b/code/game/inv.h @@ -54,42 +54,44 @@ typedef enum MODELINDEX_WEAPON_KNIFE, // 6 MODELINDEX_WEAPON_SOCOM, MODELINDEX_WEAPON_M19, - MODELINDEX_WEAPON_MICROUZI, - MODELINDEX_WEAPON_M3A1, - - MODELINDEX_WEAPON_USAS12, // 11 + MODELINDEX_WEAPON_SILVERTALON, + MODELINDEX_WEAPON_MICROUZI, + + MODELINDEX_WEAPON_M3A1, // 11 + MODELINDEX_WEAPON_MP5, + MODELINDEX_WEAPON_USAS12, MODELINDEX_WEAPON_M590, MODELINDEX_WEAPON_MSG90A1, - MODELINDEX_WEAPON_M4, - MODELINDEX_WEAPON_AK74, - MODELINDEX_WEAPON_M60, // 16 + MODELINDEX_WEAPON_M4, // 16 + MODELINDEX_WEAPON_AK74, + MODELINDEX_WEAPON_SIG551, + MODELINDEX_WEAPON_M60, MODELINDEX_WEAPON_RPG7, - MODELINDEX_WEAPON_MM1, + + MODELINDEX_WEAPON_MM1, // 21 MODELINDEX_WEAPON_M84, MODELINDEX_WEAPON_SMOHG92, - - MODELINDEX_WEAPON_ANM14, // 21 + MODELINDEX_WEAPON_ANM14, MODELINDEX_WEAPON_M15, - MODELINDEX_WEAPON_MP5, - MODELINDEX_AMMO_045, + MODELINDEX_AMMO_045, // 26 MODELINDEX_AMMO_9MM, MODELINDEX_AMMO_12GAUGE, + MODELINDEX_AMMO_762, + MODELINDEX_AMMO_556, - MODELINDEX_AMMO_762, // 26 - MODELINDEX_AMMO_556, - MODELINDEX_AMMO_40MM, + MODELINDEX_AMMO_40MM, // 31 MODELINDEX_AMMO_RPG7, MODELINDEX_BACKPACK, - MODELINDEX_GAMETYPE_ITEM, // 31 + MODELINDEX_GAMETYPE_ITEM, // 34 MODELINDEX_GAMETYPE_ITEM_2, MODELINDEX_GAMETYPE_ITEM_3, MODELINDEX_GAMETYPE_ITEM_4, MODELINDEX_GAMETYPE_ITEM_5, - MODELINDEX_ARMOR, // 36 + MODELINDEX_ARMOR, // 39 MODELINDEX_NIGHTVISION, MODELINDEX_THERMAL, diff --git a/code/game/q_shared.h b/code/game/q_shared.h index 05c1a8f..53527ea 100644 --- a/code/game/q_shared.h +++ b/code/game/q_shared.h @@ -6,12 +6,49 @@ // q_shared.h -- included first by ALL program modules. // A user mod should never modify this file -#ifdef GERMAN_BUILD - #define Q3_VERSION "SOF2MP V1.01g" // sent on 6/10/2002 - #define SOF2_VERSION_ID "1.01g" // sent on 6/10/2002 +//#define Q3_VERSION "SOF2MP V0.01" sent on 11/26/2001 +//#define Q3_VERSION "SOF2MP V0.02" sent on 12/10/2001 +//#define Q3_VERSION "SOF2MP V0.03" sent on 12/16/2001 +//#define Q3_VERSION "SOF2MP V0.081" sent on 1/15/2002 +//#define Q3_VERSION "SOF2MP V0.09" sent on 1/24/2002 +//#define Q3_VERSION "SOF2MP V0.10" sent on 1/31/2002 +//#define Q3_VERSION "SOF2MP V0.11" sent on 2/7/2002 +//#define Q3_VERSION "SOF2MP V0.12" sent on 2/14/2002 +//#define Q3_VERSION "SOF2MP V0.13" sent on 2/21/2002 +//#define Q3_VERSION "SOF2MP V0.13b" public beta #1 on 3/1/3002 +//#define Q3_VERSION "SOF2MP V0.14" sent on 3/4/2002 +//#define Q3_VERSION "SOF2MP V0.15" sent on 3/11/2002 +//#define Q3_VERSION "SOF2MP V0.15b" public beta #2 on 3/13/2002 +//#define Q3_VERSION "SOF2MP V0.16" sent on 3/18/2002 +//#define Q3_VERSION "SOF2MP V0.16b" public beta #3 on 3/20/2002 +//#define Q3_VERSION "SOF2MP V0.17" sent on 3/24/2002 +//#define Q3_VERSION "SOF2MP TEST V1.01t" sent on 3/28/2002 +//#define Q3_VERSION "SOF2MP V0.18" sent on 4/1/2002 - April Fools! +//#define Q3_VERSION "SOF2MP V1.02t" sent on 4/5/2002 +//#define Q3_VERSION "SOF2MP V0.19" sent on 4/8/2002 +//#define Q3_VERSION "SOF2MP V0.20" sent on 4/15/2002 - Tax Day! +//#define Q3_VERSION "SOF2MP V0.21" sent on 4/22/2002 +//#define Q3_VERSION "SOF2MP V1.00.22" sent on 4/26/2002 +//#define Q3_VERSION "SOF2MP V1.00.23" sent on 4/27/2002 +#if !defined(_SOF2DEV_) || defined(_DEBUG) + #ifdef GERMAN_BUILD + // #define Q3_VERSION "SOF2MP V1.00g" + #define Q3_VERSION "SOF2MP V1.02g" // sent on 6/10/2002 + // #define SOF2_VERSION_ID "1.00g" + #define SOF2_VERSION_ID "1.02g" // sent on 6/10/2002 + #else + // #define Q3_VERSION "SOF2MP V1.00" + #define Q3_VERSION "SOF2MP V1.02" // sent on 6/10/2002 + // #define SOF2_VERSION_ID "1.00" + #define SOF2_VERSION_ID "1.02" // sent on 6/10/2002 + #endif + #else - #define Q3_VERSION "SOF2MP V1.01" // sent on 6/10/2002 - #define SOF2_VERSION_ID "1.01" // sent on 6/10/2002 + + #define Q3_VERSION "SOF2MP V1.02 Developer" // sent on 6/10/2002 +// #define SOF2_VERSION_ID "1.00" + #define SOF2_VERSION_ID "1.02D" // sent on 6/10/2002 + #endif //#define SPECIAL_PRE_CACHE 1 diff --git a/code/game/sof2_game.dsp b/code/game/sof2_game.dsp index b51f1f9..9b33b4c 100644 --- a/code/game/sof2_game.dsp +++ b/code/game/sof2_game.dsp @@ -19,13 +19,10 @@ CFG=SoF2game - Win32 SH Debug SoF2 !MESSAGE !MESSAGE "SoF2game - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "SoF2game - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "SoF2game - Win32 SH Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe @@ -89,568 +86,153 @@ LINK32=link.exe # ADD LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_gamex86.map" /debug /machine:I386 /def:".\SoF2_game.def" /out:"..\Debug\sof2mp_gamex86.dll" # SUBTRACT LINK32 /pdb:none -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SoF2game___Win32_SH_Debug_SoF2" -# PROP BASE Intermediate_Dir "SoF2game___Win32_SH_Debug_SoF2" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "SoF2game___Win32_SH_Debug_SoF2" -# PROP Intermediate_Dir "SoF2game___Win32_SH_Debug_SoF2" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "BUILDING_REF_GL" /D "Debug SoF2" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "QAGAME" /D "_SOF2" /FR /YX /FD /c -# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "BUILDING_REF_GL" /D "Debug SoF2" /D "WIN32" /D "_WINDOWS" /D "MISSIONPACK" /D "QAGAME" /D "_SOF2" /D "MEM_DEBUG" /FR /YX /FD /c -# ADD BASE MTL /nologo /D "_Debug SoF2" /mktyplib203 /win32 -# ADD MTL /nologo /D "_Debug SoF2" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_Debug SoF2" -# ADD RSC /l 0x409 /d "_Debug SoF2" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /map:"..\Debug\sof2mp_gamex86.map" /debug /machine:I386 /def:".\SoF2_game.def" /out:"..\Debug\sof2mp_gamex86.dll" -# SUBTRACT BASE LINK32 /pdb:none -# ADD LINK32 kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /pdb:"..\SHDebug/sof2mp_gamex86.pdb" /map:"..\SHDebug\sof2mp_gamex86.map" /debug /machine:I386 /def:".\SoF2_game.def" /out:"..\SHDebug\sof2mp_gamex86.dll" -# SUBTRACT LINK32 /pdb:none - !ENDIF # Begin Target # Name "SoF2game - Win32 Release SoF2" # Name "SoF2game - Win32 Debug SoF2" -# Name "SoF2game - Win32 SH Debug SoF2" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" # Begin Source File SOURCE=.\ai_main.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\ai_util.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\ai_wpnav.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_gametype.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_lib.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP BASE Exclude_From_Build 1 -# PROP Intermediate_Dir "..\SHDebug\SoF2game" -# PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_misc.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_player.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_pmove.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_slidemove.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_weapons.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_active.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_antilag.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_bot.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_client.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_cmds.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_combat.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_gametype.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_items.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_main.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_misc.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_missile.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_mover.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_session.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_spawn.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_svcmds.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_syscalls.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_target.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_team.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_trigger.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_utils.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_weapon.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\q_math.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\q_shared.c - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\SoF2_game.def - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - # PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP BASE Exclude_From_Build 1 -# PROP Intermediate_Dir "..\SHDebug\SoF2game" -# PROP Exclude_From_Build 1 - -!ENDIF - # End Source File # End Group # Begin Group "Header Files" @@ -659,452 +241,126 @@ SOURCE=.\SoF2_game.def # Begin Source File SOURCE=.\ai_main.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\anims.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\be_aas.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\be_ai_char.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\be_ai_chat.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\be_ai_gen.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\be_ai_goal.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\be_ai_move.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\be_ai_weap.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\be_ea.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_local.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_public.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\bg_weapons.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\botlib.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\cgame\cg_local.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\cgame\cg_public.h +# End Source File +# Begin Source File -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - +SOURCE=..\cgame\cg_was.h # End Source File # Begin Source File SOURCE=.\chars.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\qcommon\disablewarnings.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\ghoul2\G2.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_local.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_public.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\g_team.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\inv.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\match.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\..\ui\menudef.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\q_shared.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\surfaceflags.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=.\syn.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\qcommon\tags.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # Begin Source File SOURCE=..\cgame\tr_types.h - -!IF "$(CFG)" == "SoF2game - Win32 Release SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 Debug SoF2" - -!ELSEIF "$(CFG)" == "SoF2game - Win32 SH Debug SoF2" - -# PROP Intermediate_Dir "..\SHDebug\SoF2game" - -!ENDIF - # End Source File # End Group # Begin Group "Resource Files" diff --git a/code/gametype/gt_ctf/gt_ctf.dsp b/code/gametype/gt_ctf/gt_ctf.dsp index 997ce97..b16bbfe 100644 --- a/code/gametype/gt_ctf/gt_ctf.dsp +++ b/code/gametype/gt_ctf/gt_ctf.dsp @@ -17,6 +17,7 @@ CFG=gt_ctf - Win32 Debug SoF2 !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE +!MESSAGE "gt_ctf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "gt_ctf - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE @@ -26,8 +27,38 @@ CPP=cl.exe MTL=midl.exe RSC=rc.exe -!IF "$(CFG)" == "gt_ctf - Win32 Debug SoF2" +!IF "$(CFG)" == "gt_ctf - Win32 Debug" +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GT_CTF_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GT_CTF_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "gt_ctf - Win32 Debug SoF2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug SoF2" +# PROP BASE Intermediate_Dir "Debug SoF2" +# PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\..\Debug" @@ -51,6 +82,7 @@ LINK32=link.exe # Begin Target +# Name "gt_ctf - Win32 Debug" # Name "gt_ctf - Win32 Debug SoF2" # Begin Group "Source Files" diff --git a/code/gametype/gt_ctf/gt_main.c b/code/gametype/gt_ctf/gt_main.c index 79c7802..cebc798 100644 --- a/code/gametype/gt_ctf/gt_main.c +++ b/code/gametype/gt_ctf/gt_main.c @@ -36,10 +36,9 @@ static cvarTable_t gametypeCvarTable[] = // don't override the cheat state set by the system { >_flagReturnTime, "gt_flagReturnTime", "30", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, { >_simpleScoring, "gt_simpleScoring", "0", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, + { NULL, NULL, NULL, 0, 0.0f, 0.0f, 0, qfalse }, }; -static int gametypeCvarTableSize = sizeof( gametypeCvarTable ) / sizeof( gametypeCvarTable[0] ); - /* ================ vmMain @@ -79,10 +78,9 @@ GT_RegisterCvars */ void GT_RegisterCvars( void ) { - int i; cvarTable_t *cv; - for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ ) + for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ ) { trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue ); @@ -100,10 +98,9 @@ GT_UpdateCvars */ void GT_UpdateCvars( void ) { - int i; cvarTable_t *cv; - for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ ) + for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ ) { if ( cv->vmCvar ) { diff --git a/code/gametype/gt_dem/gt_dem.dsp b/code/gametype/gt_dem/gt_dem.dsp index 8aa3d71..b131390 100644 --- a/code/gametype/gt_dem/gt_dem.dsp +++ b/code/gametype/gt_dem/gt_dem.dsp @@ -23,8 +23,6 @@ CFG=gt_dem - Win32 Debug SoF2 # Begin Project # PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName ""$/SoF2/code/gametype/gt_dem", ZRDAAAAA" -# PROP Scc_LocalPath "." CPP=cl.exe MTL=midl.exe RSC=rc.exe diff --git a/code/gametype/gt_dem/gt_main.c b/code/gametype/gt_dem/gt_main.c index 9357d3a..9f583bc 100644 --- a/code/gametype/gt_dem/gt_main.c +++ b/code/gametype/gt_dem/gt_main.c @@ -41,7 +41,7 @@ static cvarTable_t gametypeCvarTable[] = { >_bombDefuseTime, "gt_bombDefuseTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse }, { >_bombPlantTime, "gt_bombPlantTime", "3", CVAR_ARCHIVE|CVAR_LATCH, 0.0f, 0.0f, 0, qfalse }, { >_simpleScoring, "gt_simpleScoring", "0", CVAR_ARCHIVE, 0.0f, 0.0f, 0, qfalse }, - + { NULL, NULL, NULL, 0, 0.0f, 0.0f, 0, qfalse }, }; static int gametypeCvarTableSize = sizeof( gametypeCvarTable ) / sizeof( gametypeCvarTable[0] ); @@ -88,10 +88,9 @@ GT_RegisterCvars */ void GT_RegisterCvars( void ) { - int i; cvarTable_t *cv; - for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ ) + for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ ) { trap_Cvar_Register( cv->vmCvar, cv->cvarName, cv->defaultString, cv->cvarFlags, cv->mMinValue, cv->mMaxValue ); @@ -109,10 +108,9 @@ GT_UpdateCvars */ void GT_UpdateCvars( void ) { - int i; cvarTable_t *cv; - for ( i = 0, cv = gametypeCvarTable ; i < gametypeCvarTableSize ; i++, cv++ ) + for ( cv = gametypeCvarTable ; cv->cvarName != NULL; cv++ ) { if ( cv->vmCvar ) { @@ -248,12 +246,12 @@ void GT_RunFrame ( int time ) trap_Cmd_TextMessage ( -1, "Blue team has destroyed the target!" ); trap_Cmd_StartGlobalSound ( gametype.bombExplodedSound ); trap_Cmd_Restart ( 5 ); - } - // Give the guy who planted it some props - if ( !gt_simpleScoring.integer ) - { - trap_Cmd_AddClientScore ( gametype.bombPlantClient, 10 ); + // Give the guy who planted it some props + if ( !gt_simpleScoring.integer ) + { + trap_Cmd_AddClientScore ( gametype.bombPlantClient, 10 ); + } } gametype.bombPlantTime = 0; @@ -341,6 +339,7 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar trap_Cmd_TextMessage ( -1, "Red team has defended the bomb site!" ); trap_Cmd_AddTeamScore ( TEAM_RED, 1 ); trap_Cmd_Restart ( 5 ); + gametype.roundOver = qtrue; break; case GTEV_TEAM_ELIMINATED: @@ -380,11 +379,11 @@ int GT_Event ( int cmd, int time, int arg0, int arg1, int arg2, int arg3, int ar trap_Cmd_Restart ( 5 ); gametype.roundOver = qtrue; - // Give the guy who defused it some props - if ( !gt_simpleScoring.integer ) - { - trap_Cmd_AddClientScore ( arg1, 10 ); - } + // Give the guy who defused it some props + if ( !gt_simpleScoring.integer ) + { + trap_Cmd_AddClientScore ( arg1, 10 ); + } return 1; } diff --git a/code/gametype/gt_dm/gt_dm.dsp b/code/gametype/gt_dm/gt_dm.dsp index 5e85d5a..33027f2 100644 --- a/code/gametype/gt_dm/gt_dm.dsp +++ b/code/gametype/gt_dm/gt_dm.dsp @@ -17,6 +17,7 @@ CFG=gt_dm - Win32 Debug SoF2 !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE +!MESSAGE "gt_dm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "gt_dm - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE @@ -26,8 +27,38 @@ CPP=cl.exe MTL=midl.exe RSC=rc.exe -!IF "$(CFG)" == "gt_dm - Win32 Debug SoF2" +!IF "$(CFG)" == "gt_dm - Win32 Debug" +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dm_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_dm_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "gt_dm - Win32 Debug SoF2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug SoF2" +# PROP BASE Intermediate_Dir "Debug SoF2" +# PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\..\Debug" @@ -51,6 +82,7 @@ LINK32=link.exe # Begin Target +# Name "gt_dm - Win32 Debug" # Name "gt_dm - Win32 Debug SoF2" # Begin Group "Source Files" diff --git a/code/gametype/gt_elim/gt_elim.bat b/code/gametype/gt_elim/gt_elim.bat index 688100d..c35e227 100644 --- a/code/gametype/gt_elim/gt_elim.bat +++ b/code/gametype/gt_elim/gt_elim.bat @@ -22,9 +22,9 @@ set cc=..\..\..\..\bin\sof2lcc -A -DQ3_VM -DMISSIONPACK -S -Wf-target=bytecode - ..\..\..\..\bin\sof2asm -f ../gt_elim @if errorlevel 1 goto quit -mkdir "..\..\..\..\base\vm" -copy *.map "..\..\..\..\base\vm" -copy *.qvm "..\..\..\..\base\vm" +mkdir "..\..\..\Debug\base\MP\vm" +copy *.map "..\..\..\Debug\base\MP\vm" +copy *.qvm "..\..\..\Debug\base\MP\vm" :quit cd .. diff --git a/code/gametype/gt_inf/gt_inf.dsp b/code/gametype/gt_inf/gt_inf.dsp index 4f37439..bf35406 100644 --- a/code/gametype/gt_inf/gt_inf.dsp +++ b/code/gametype/gt_inf/gt_inf.dsp @@ -17,6 +17,7 @@ CFG=gt_inf - Win32 Debug SoF2 !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE +!MESSAGE "gt_inf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "gt_inf - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE @@ -26,8 +27,38 @@ CPP=cl.exe MTL=midl.exe RSC=rc.exe -!IF "$(CFG)" == "gt_inf - Win32 Debug SoF2" +!IF "$(CFG)" == "gt_inf - Win32 Debug" +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_inf_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_inf_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "gt_inf - Win32 Debug SoF2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug SoF2" +# PROP BASE Intermediate_Dir "Debug SoF2" +# PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\..\Debug" @@ -51,6 +82,7 @@ LINK32=link.exe # Begin Target +# Name "gt_inf - Win32 Debug" # Name "gt_inf - Win32 Debug SoF2" # Begin Group "Source Files" diff --git a/code/gametype/gt_tdm/gt_tdm.dsp b/code/gametype/gt_tdm/gt_tdm.dsp index 25905b7..f1693cf 100644 --- a/code/gametype/gt_tdm/gt_tdm.dsp +++ b/code/gametype/gt_tdm/gt_tdm.dsp @@ -17,6 +17,7 @@ CFG=gt_tdm - Win32 Debug SoF2 !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE +!MESSAGE "gt_tdm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "gt_tdm - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE @@ -26,8 +27,38 @@ CPP=cl.exe MTL=midl.exe RSC=rc.exe -!IF "$(CFG)" == "gt_tdm - Win32 Debug SoF2" +!IF "$(CFG)" == "gt_tdm - Win32 Debug" +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_tdm_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "gt_tdm_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept + +!ELSEIF "$(CFG)" == "gt_tdm - Win32 Debug SoF2" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug SoF2" +# PROP BASE Intermediate_Dir "Debug SoF2" +# PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "..\..\Debug" @@ -51,6 +82,7 @@ LINK32=link.exe # Begin Target +# Name "gt_tdm - Win32 Debug" # Name "gt_tdm - Win32 Debug SoF2" # Begin Group "Source Files" diff --git a/code/ui/keycodes.h b/code/ui/keycodes.h index 67a1edd..085064c 100644 --- a/code/ui/keycodes.h +++ b/code/ui/keycodes.h @@ -53,6 +53,8 @@ typedef enum { K_F14, K_F15, + K_SCROLL, + K_KP_HOME, K_KP_UPARROW, K_KP_PGUP, diff --git a/code/ui/sof2_ui.dsp b/code/ui/sof2_ui.dsp index b066fb1..89851bd 100644 --- a/code/ui/sof2_ui.dsp +++ b/code/ui/sof2_ui.dsp @@ -1,4 +1,4 @@ -# Microsoft Developer Studio Project File - Name="SoF2ui" - Package Owner=<4> +# Microsoft Developer Studio Project File - Name="ui" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** @@ -13,13 +13,12 @@ CFG=ui - Win32 SH Debug SoF2 !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "sof2_ui.mak" CFG="SoF2ui - Win32 SH Debug SoF2" +!MESSAGE NMAKE /f "sof2_ui.mak" CFG="ui - Win32 SH Debug SoF2" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "SoF2ui - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "SoF2ui - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "SoF2ui - Win32 SH Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "ui - Win32 Debug SoF2" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "ui - Win32 Release SoF2" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project @@ -28,12 +27,12 @@ CPP=cl.exe MTL=midl.exe RSC=rc.exe -!IF "$(CFG)" == "SoF2ui - Win32 Debug SoF2" +!IF "$(CFG)" == "ui - Win32 Debug SoF2" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SoF2ui___Win32_Debug_SoF2" -# PROP BASE Intermediate_Dir "SoF2ui___Win32_Debug_SoF2" +# PROP BASE Output_Dir "ui___Win32_Debug_SoF2" +# PROP BASE Intermediate_Dir "ui___Win32_Debug_SoF2" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 @@ -57,12 +56,12 @@ LINK32=link.exe # ADD LINK32 /nologo /base:"0x40000000" /dll /map:"..\Debug\of2mp_uix86.map" /debug /machine:I386 /out:"../Debug/sof2mp_uix86.dll" /pdbtype:sept # SUBTRACT LINK32 /pdb:none -!ELSEIF "$(CFG)" == "SoF2ui - Win32 Release SoF2" +!ELSEIF "$(CFG)" == "ui - Win32 Release SoF2" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "SoF2ui___Win32_Release_SoF2" -# PROP BASE Intermediate_Dir "SoF2ui___Win32_Release_SoF2" +# PROP BASE Output_Dir "ui___Win32_Release_SoF2" +# PROP BASE Intermediate_Dir "ui___Win32_Release_SoF2" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" # PROP Use_MFC 0 @@ -86,42 +85,12 @@ LINK32=link.exe # ADD BASE LINK32 /nologo /base:"0x40000000" /dll /map /debug /machine:I386 /out:"../Release JK2/uix86.dll" # ADD LINK32 /nologo /base:"0x40000000" /dll /map:"../Release/sof2mp_uix86.map" /debug /machine:I386 /out:"../Release/sof2mp_uix86.dll" -!ELSEIF "$(CFG)" == "SoF2ui - Win32 SH Debug SoF2" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "SoF2ui___Win32_SH_Debug_SoF2" -# PROP BASE Intermediate_Dir "SoF2ui___Win32_SH_Debug_SoF2" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\SHDebug\ui" -# PROP Intermediate_Dir "..\SHDebug\ui" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "_USRDLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "UI_EXPORTS" /D "MISSIONPACK" /D "_SOF2" /FR /YX /FD /GZ /c -# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "_USRDLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "UI_EXPORTS" /D "MISSIONPACK" /D "_SOF2" /D "MEM_DEBUG" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_Debug JK2" /mktyplib203 /win32 -# ADD MTL /nologo /D "_Debug JK2" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_Debug JK2" -# ADD RSC /l 0x409 /d "_Debug JK2" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /base:"0x40000000" /dll /map:"..\Debug\of2mp_uix86.map" /debug /machine:I386 /out:"../Debug/sof2mp_uix86.dll" /pdbtype:sept -# SUBTRACT BASE LINK32 /pdb:none -# ADD LINK32 /nologo /base:"0x40000000" /dll /map:"..\SHDebug\of2mp_uix86.map" /debug /machine:I386 /out:"../SHDebug/sof2mp_uix86.dll" /pdbtype:sept -# SUBTRACT LINK32 /pdb:none - !ENDIF # Begin Target -# Name "SoF2ui - Win32 Debug SoF2" -# Name "SoF2ui - Win32 Release SoF2" -# Name "SoF2ui - Win32 SH Debug SoF2" +# Name "ui - Win32 Debug SoF2" +# Name "ui - Win32 Release SoF2" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" diff --git a/code/ui/ui_local.h b/code/ui/ui_local.h index 82fe96f..23e6e99 100644 --- a/code/ui/ui_local.h +++ b/code/ui/ui_local.h @@ -742,6 +742,13 @@ void trap_Parental_Update ( void ); void trap_Parental_SetPassword ( const char* password ); void trap_Parental_GetPassword ( char* password, int size ); +void trap_PunkBuster_Enable ( void ); +void trap_PunkBuster_Disable ( void ); +int trap_PunkBuster_IsEnabled ( void ); + +int trap_GetTeamCount ( int team ); +int trap_GetTeamScore ( int team ); + void trap_Print( const char *string ); void trap_Error( const char *string ); int trap_Milliseconds( void ); diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index b0049f7..0e6fb82 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -714,6 +714,16 @@ void UI_DrawObjectivePhotos ( rectDef_t *rect, qhandle_t font, float scale, vec4 } } +static void UI_DrawTeamCount ( int team, rectDef_t *rect, qhandle_t font, float scale, vec4_t color ) +{ + UI_DrawText (rect->x, rect->y, font, scale, color, va("%d",trap_GetTeamCount(team)), 0, 0 ); +} + +static void UI_DrawTeamScore ( int team, rectDef_t *rect, qhandle_t font, float scale, vec4_t color ) +{ + UI_DrawText (rect->x, rect->y, font, scale, color, va("%d",trap_GetTeamScore(team)), 0, 0 ); +} + // ui_gameType assumes gametype 0 is -1 ALL and will not show static void UI_DrawGameType(rectDef_t *rect, qhandle_t font, float scale, vec4_t color ) { @@ -1447,6 +1457,22 @@ static void UI_OwnerDraw(float x, float y, float w, float h, float text_x, float switch (ownerDraw) { + case UI_RED_TEAM_COUNT: + UI_DrawTeamCount ( TEAM_RED, &rect, font, scale, color ); + break; + + case UI_BLUE_TEAM_COUNT: + UI_DrawTeamCount ( TEAM_BLUE, &rect, font, scale, color ); + break; + + case UI_RED_TEAM_SCORE: + UI_DrawTeamScore ( TEAM_RED, &rect, font, scale, color ); + break; + + case UI_BLUE_TEAM_SCORE: + UI_DrawTeamScore ( TEAM_BLUE, &rect, font, scale, color ); + break; + case UI_OUTFITTING_SLOT_RENDER: UI_DrawOutfittingSlotRender ( &rect, atoi ( param )); break; @@ -2510,6 +2536,8 @@ static void UI_RunMenuScript(const char **args) else if ( Q_stricmp ( name, "autoTeamJoin" ) == 0 ) { qboolean joinRed = qfalse; + int countRed = 0; + int countBlue = 0; if ( !String_Parse(args, &name) || !name ) { @@ -2521,18 +2549,21 @@ static void UI_RunMenuScript(const char **args) return; } + countRed = trap_GetTeamCount ( TEAM_RED ); + countBlue = trap_GetTeamCount ( TEAM_BLUE ); + // If the teams have the same number of players then join the // team that has less points - if ( ui_info_bluecount.integer == ui_info_redcount.integer ) + if ( countRed == countBlue ) { // If the blue team has more points then join red - if ( ui_info_bluescore.integer > ui_info_redscore.integer ) + if ( trap_GetTeamScore ( TEAM_BLUE ) > trap_GetTeamScore ( TEAM_RED ) ) { joinRed = qtrue; } } // If the blue team has more players then join red - else if ( ui_info_bluecount.integer > ui_info_redcount.integer ) + else if ( countBlue > countRed ) { joinRed = qtrue; } @@ -2810,10 +2841,29 @@ static void UI_RunMenuScript(const char **args) } else if (Q_stricmp(name, "RefreshServers") == 0) { UI_StartServerRefresh(qtrue); UI_BuildServerDisplayList(qtrue); - } else if (Q_stricmp(name, "RefreshFilter") == 0) { + } + else if (Q_stricmp(name, "RefreshFilter") == 0) + { UI_StartServerRefresh(qfalse); UI_BuildServerDisplayList(qtrue); - } else if (Q_stricmp(name, "RunSPDemo") == 0) { + } + else if (Q_stricmp(name, "updatePunkbuster" ) == 0 ) + { + int enabled = (int)trap_Cvar_VariableValue ( "ui_browserPunkbuster" ); + + if ( enabled ) + { + trap_PunkBuster_Enable ( ); + } + else + { + trap_PunkBuster_Disable ( ); + } + + trap_Cvar_Set ( "ui_browserPunkbuster", trap_PunkBuster_IsEnabled ( ) ? "1":"0" ); + } + else if (Q_stricmp(name, "RunSPDemo") == 0) + { if (uiInfo.demoAvailable) { trap_Cmd_ExecuteText( EXEC_APPEND, va("demo %s_%s\n", uiInfo.mapList[ui_currentMap.integer].mapLoadName, bg_gametypeData[ui_gameType.integer].name)); } @@ -2852,7 +2902,11 @@ static void UI_RunMenuScript(const char **args) uiInfo.serverStatus.nextDisplayRefresh = 0; uiInfo.nextServerStatusRefresh = 0; uiInfo.nextFindPlayerRefresh = 0; - } else if (Q_stricmp(name, "UpdateFilter") == 0) { + } + else if (Q_stricmp(name, "UpdateFilter") == 0) + { + trap_Cvar_Set ( "ui_browserPunkbuster", trap_PunkBuster_IsEnabled ( ) ? "1" : "0" ); + if (ui_netSource.integer == AS_LOCAL) { UI_StartServerRefresh(qtrue); } @@ -3910,7 +3964,7 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan static char info[MAX_STRING_CHARS]; static char info2[MAX_STRING_CHARS]; static char hostname[MAX_STRING_CHARS]; - static char needpass[2]; + static char yesno[5]; static char clientBuff[32]; static int lastColumn = -1; static int lastTime = 0; @@ -3974,10 +4028,27 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan switch (column) { + case SORT_PUNKBUSTER: + if ( atoi(Info_ValueForKey(info, "sv_punkbuster")) ) + { + strcpy ( yesno, "*" ); + } + else + { + strcpy ( yesno, "" ); + } + return yesno; + case SORT_NEEDPASS: - needpass[0] = atoi(Info_ValueForKey(info, "needpass"))?'*':' '; - needpass[1] = 0; - return needpass; + if ( atoi(Info_ValueForKey(info, "needpass")) ) + { + strcpy ( yesno, "*" ); + } + else + { + strcpy ( yesno, "" ); + } + return yesno; case SORT_HOST : if (ping <= 0) @@ -4024,11 +4095,11 @@ static const char *UI_FeederItemText(float feederID, int index, int column, qhan game = BG_FindGametype ( Info_ValueForKey(info, "gametype") ); if (ping <= 0) { - return "Inactive"; + return "----"; } else if (game < 0) { - return "Unknown"; + return "????"; } return bg_gametypeData[game].name; @@ -4956,7 +5027,7 @@ void UI_DrawConnectScreen( qboolean overlay ) { } // display global MOTD at bottom - Text_PaintCenter(centerPoint, 600, uiInfo.uiDC.Assets.defaultFont, scale, colorWhite, Info_ValueForKey( cstate.updateInfoString, "motd" ), 0 ); + Text_PaintCenter(centerPoint, yStart + 13, uiInfo.uiDC.Assets.defaultFont, scale, colorWhite, Info_ValueForKey( cstate.updateInfoString, "motd" ), 0 ); // print any server info (server full, bad version, etc) if ( cstate.connState < CA_CONNECTED ) @@ -4980,7 +5051,7 @@ void UI_DrawConnectScreen( qboolean overlay ) { } } - Text_PaintCenter(centerPoint, yStart + 112, uiInfo.uiDC.Assets.defaultFont, scale, colorRed, cstate.messageString, 0 ); + Text_PaintCenter(centerPoint, yStart + 112, uiInfo.uiDC.Assets.defaultFont, scale * 0.8f, colorRed, cstate.messageString, 0 ); } if ( lastConnState > cstate.connState ) { @@ -5136,6 +5207,7 @@ vmCvar_t ui_info_team; vmCvar_t ui_info_teamgame; vmCvar_t ui_info_redscore; vmCvar_t ui_info_bluescore; +vmCvar_t ui_info_showobjectives; vmCvar_t ui_joinserver; vmCvar_t ui_allowparental; @@ -5220,6 +5292,7 @@ static cvarTable_t cvarTable[] = { &ui_info_redscore, "ui_info_redscore", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_bluescore, "ui_info_bluescore", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_objectives, "ui_info_objectives", "0", CVAR_ROM|CVAR_INTERNAL }, + { &ui_info_showobjectives, "ui_info_showobjectives", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_gametype, "ui_info_gametype", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_team, "ui_info_team", "0", CVAR_ROM|CVAR_INTERNAL }, { &ui_info_teamgame, "ui_info_teamgame", "0", CVAR_ROM|CVAR_INTERNAL }, diff --git a/code/ui/ui_public.h b/code/ui/ui_public.h index ee8f7ad..c972f24 100644 --- a/code/ui/ui_public.h +++ b/code/ui/ui_public.h @@ -227,6 +227,13 @@ typedef enum UI_VERSION_GET_SITE, UI_VERSION_DOWNLOAD, + UI_PB_ENABLE, + UI_PB_DISABLE, + UI_PB_ISENABLED, + + UI_GET_TEAM_COUNT, + UI_GET_TEAM_SCORE, + } uiImport_t; typedef enum @@ -249,6 +256,7 @@ typedef enum #define SORT_CLIENTS 3 #define SORT_GAME 4 #define SORT_PING 5 +#define SORT_PUNKBUSTER 6 typedef enum { diff --git a/code/ui/ui_shared.c b/code/ui/ui_shared.c index 3aa5d25..ab9347a 100644 --- a/code/ui/ui_shared.c +++ b/code/ui/ui_shared.c @@ -5306,6 +5306,9 @@ menuDef_t *Menus_ActivateByName(const char *p) menuDef_t *m = NULL; menuDef_t *focus = Menu_GetFocused(); + DC->tooltiptime = DC->realTime; + DC->tooltipItem = NULL; + // If we find a match for the window then save the pointer, otherwise // clear the focus of the window since the window we are looking // for will get the focus eventually diff --git a/code/ui/ui_syscalls.asm b/code/ui/ui_syscalls.asm index 7a42ee7..d98006a 100644 --- a/code/ui/ui_syscalls.asm +++ b/code/ui/ui_syscalls.asm @@ -148,6 +148,11 @@ equ trap_Version_GetDescription -174 ; UI_VERSION_GET_DESCRIPTION equ trap_Version_GetNumSites -175 ; UI_VERSION_GET_NUM_SITES equ trap_Version_GetSite -176 ; UI_VERSION_GET_SITE equ trap_Version_Download -177 ; UI_VERSION_DOWNLOAD +equ trap_PunkBuster_Enable -178 ; UI_PB_ENABLE +equ trap_PunkBuster_Disable -179 ; UI_PB_DISABLE +equ trap_PunkBuster_IsEnabled -180 ; UI_PB_ISENABLED +equ trap_GetTeamCount -181 ; UI_GET_TEAM_COUNT +equ trap_GetTeamScore -182 ; UI_GET_TEAM_SCORE ; hardcoded functions diff --git a/code/ui/ui_syscalls.c b/code/ui/ui_syscalls.c index c84946d..f4821da 100644 --- a/code/ui/ui_syscalls.c +++ b/code/ui/ui_syscalls.c @@ -699,3 +699,29 @@ void trap_Version_Download(int index) { syscall(UI_VERSION_DOWNLOAD, index); } + +void trap_PunkBuster_Enable ( void ) +{ + syscall ( UI_PB_ENABLE ); +} + +void trap_PunkBuster_Disable ( void ) +{ + syscall ( UI_PB_DISABLE ); +} + +int trap_PunkBuster_IsEnabled ( void ) +{ + return syscall ( UI_PB_ISENABLED ); +} + +int trap_GetTeamCount ( int team ) +{ + return syscall ( UI_GET_TEAM_COUNT, team ); +} + +int trap_GetTeamScore ( int team ) +{ + return syscall ( UI_GET_TEAM_SCORE, team ); +} + diff --git a/readme.txt b/readme.txt index 833e04a..0b3e025 100644 --- a/readme.txt +++ b/readme.txt @@ -11,6 +11,7 @@ bin sof2map.exe sof2data.exe striped.exe + sof2mpdev.exe docs Docs for: Vertigons (surface sprites) @@ -29,8 +30,17 @@ resources Max files for a male figure and the inview hands +SDK V1.02 09/24/2002 +----------------------- + +- Now includes sof2mpdev.exe to allow mod makers to use the cvars that were + removed from 1.02. +- Updated 1.02 source code + + SDK V0.02 07/03/2002 ----------------------- + diff --git a/ui/createserver.menu b/ui/createserver.menu index ffcf49d..8a16082 100644 --- a/ui/createserver.menu +++ b/ui/createserver.menu @@ -862,6 +862,44 @@ } } + itemDef + { + name punkbuster_field + group createserver_options + type ITEM_TYPE_YESNO + style WINDOW_STYLE_FILLED + text "PunkBuster:" + + cvar "sv_punkbuster" + rect 50 207 210 15 + textalign ITEM_ALIGN_RIGHT + textalignx 120 + textaligny 0 + textfont "hud" + textscale .43 + forecolor .12 .14 .08 1 + backcolor 0 0 0 0 + visible 1 + + action + { + play "sound/misc/menus/select.wav" ; + } + + mouseEnter + { + play "sound/misc/menus/hilite1.wav" ; + setitemcolor punkbuster_field backcolor .12 .14 .08 1 + setitemcolor punkbuster_field forecolor .49 .56 .27 1 + } + + mouseExit + { + setitemcolor punkbuster_field backcolor 0 0 0 0 + setitemcolor punkbuster_field forecolor .12 .14 .08 1 + } + } + itemDef { name dedicated_field @@ -872,7 +910,7 @@ cvar "ui_dedicated" cvarFloatList { "No" 0 "LAN" 1 "Internet" 2 } - rect 50 207 210 15 + rect 50 222 210 15 textalign ITEM_ALIGN_RIGHT textalignx 120 textaligny 0 @@ -911,7 +949,7 @@ maxChars 32 maxPaintChars 22 cvar "sv_hostname" - rect 50 222 325 15 + rect 50 237 325 15 textalign ITEM_ALIGN_RIGHT textalignx 120 textaligny 0 @@ -949,7 +987,7 @@ text "Maximum Players:" maxChars 2 cvar "sv_maxclients" - rect 30 237 230 15 + rect 30 252 230 15 textalign ITEM_ALIGN_RIGHT textalignx 140 textaligny 0 @@ -987,7 +1025,7 @@ style WINDOW_STYLE_FILLED text "Password:" cvar "g_password" - rect 50 252 325 15 + rect 50 267 325 15 textalign ITEM_ALIGN_RIGHT textalignx 120 textaligny 0 diff --git a/ui/hud.menu b/ui/hud.menu index 342d7c2..36a7adc 100644 --- a/ui/hud.menu +++ b/ui/hud.menu @@ -341,7 +341,7 @@ visible 1 decoration - ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE + ownerdrawflag CG_SHOW_HUD_SNIPERCLIP } itemDef @@ -353,7 +353,7 @@ visible 1 decoration - ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE + ownerdrawflag CG_SHOW_HUD_SNIPERCLIP } itemDef { @@ -364,7 +364,7 @@ visible 1 decoration - ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE + ownerdrawflag CG_SHOW_HUD_SNIPERCLIP } itemDef { @@ -375,7 +375,7 @@ visible 1 decoration - ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE + ownerdrawflag CG_SHOW_HUD_SNIPERCLIP } itemDef { @@ -386,7 +386,7 @@ visible 1 decoration - ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE + ownerdrawflag CG_SHOW_HUD_SNIPERCLIP } itemDef { @@ -397,7 +397,7 @@ visible 1 decoration - ownerdrawflag CG_SHOW_HUD_SNIPERSCOPE + ownerdrawflag CG_SHOW_HUD_SNIPERCLIP } itemDef { diff --git a/ui/ingame_about.menu b/ui/ingame_about.menu index baded16..302aee6 100644 --- a/ui/ingame_about.menu +++ b/ui/ingame_about.menu @@ -109,7 +109,7 @@ itemDef { name window - rect 0 10 300 20 + rect 0 0 300 20 name gametypefield type ITEM_TYPE_EDITFIELD style 0 @@ -128,7 +128,7 @@ itemDef { name window - rect 0 25 300 20 + rect 0 15 300 20 name gametypefield type ITEM_TYPE_EDITFIELD style 0 @@ -148,7 +148,7 @@ { name window type ITEM_TYPE_EDITFIELD - rect 0 40 300 20 + rect 0 30 300 20 textalign ITEM_ALIGN_RIGHT cvar "ui_about_gametypename" text "GameType:" @@ -164,7 +164,7 @@ { name window type ITEM_TYPE_EDITFIELD - rect 0 55 300 20 + rect 0 45 300 20 maxPaintChars 12 cvar "ui_about_scorelimit" text "Score Limit:" @@ -181,7 +181,7 @@ { name window type ITEM_TYPE_EDITFIELD - rect 0 70 300 20 + rect 0 60 300 20 maxPaintChars 12 cvar "ui_about_timelimit" text "Time Limit:" @@ -194,11 +194,45 @@ decoration } + itemDef + { + name window + type ITEM_TYPE_YESNO + rect 0 75 300 20 + maxPaintChars 12 + cvar "ui_about_friendlyfire" + text "Friendly Fire:" + textalign ITEM_ALIGN_RIGHT + textalignx 128 + textfont "hud" + textscale .40 + forecolor .12 .14 .08 1 + visible 1 + decoration + } + + itemDef + { + name window + type ITEM_TYPE_YESNO + rect 0 90 300 20 + maxPaintChars 12 + cvar "cl_punkbuster" + text "Punk Buster:" + textalign ITEM_ALIGN_RIGHT + textalignx 128 + textfont "hud" + textscale .40 + forecolor .12 .14 .08 1 + visible 1 + decoration + } + itemDef { name window type ITEM_TYPE_EDITFIELD - rect 0 95 300 20 + rect 0 115 300 20 cvar "protocol" maxPaintChars 12 text "Protocol:" @@ -215,7 +249,7 @@ { name window type ITEM_TYPE_EDITFIELD - rect 0 110 300 20 + rect 0 130 300 20 cvar "ui_about_maxclients" maxPaintChars 12 text "Max Clients:" @@ -232,7 +266,7 @@ { name window type ITEM_TYPE_EDITFIELD - rect 0 125 300 20 + rect 0 145 300 20 cvar "ui_about_hostname" maxPaintChars 12 text "Host Name:" @@ -248,7 +282,7 @@ itemDef { name window - rect 0 150 300 20 + rect 0 170 300 20 type ITEM_TYPE_YESNO cvar "ui_about_needpass" text "Password:" @@ -264,7 +298,7 @@ itemDef { name window - rect 0 165 300 20 + rect 0 185 300 20 type ITEM_TYPE_YESNO cvar "ui_about_dmflags" text "DM Flags:" @@ -280,7 +314,7 @@ itemDef { name window - rect 0 180 300 20 + rect 0 200 300 20 type ITEM_TYPE_EDITFIELD cvar "ui_about_seed" text "RMG Seed:" @@ -301,29 +335,11 @@ } -/* - itemDef - { - name window - type ITEM_TYPE_YESNO - rect 0 180 300 20 - cvar "bot_minplayers" - text "Bot/Min:" - textalign ITEM_ALIGN_RIGHT - textalignx 128 - textfont "hud" - textscale .40 - forecolor .12 .14 .08 1 - visible 1 - decoration - } -*/ - itemDef { name window type ITEM_TYPE_EDITFIELD - rect 0 205 300 20 + rect 0 215 300 20 cvar "version" maxPaintChars 32 text "Version:" diff --git a/ui/ingame_player.menu b/ui/ingame_player.menu index 019b0fb..7b98d0f 100644 --- a/ui/ingame_player.menu +++ b/ui/ingame_player.menu @@ -299,12 +299,11 @@ border 1 bordercolor 0 0 0 1 - cvarTest "ui_about_gametype" + cvarTest "ui_info_showobjectives" disableCvar { "0" ; - "1" ; } action diff --git a/ui/ingame_team.menu b/ui/ingame_team.menu index 64bc568..a5541da 100644 --- a/ui/ingame_team.menu +++ b/ui/ingame_team.menu @@ -375,7 +375,7 @@ itemDef { rect 410 275 0 0 - cvar ui_info_redcount + ownerdraw UI_RED_TEAM_COUNT textfont "hud" textalign 2 textscale .43 @@ -398,7 +398,7 @@ itemDef { rect 230 275 0 0 - cvar ui_info_bluecount + ownerdraw UI_BLUE_TEAM_COUNT textfont "hud" textscale .43 forecolor 0 0 0 1 @@ -424,7 +424,7 @@ itemDef { rect 410 315 0 0 - cvar ui_info_redscore + ownerdraw UI_RED_TEAM_SCORE textfont "hud" textalign 2 textscale .43 @@ -447,7 +447,7 @@ itemDef { rect 230 315 0 0 - cvar ui_info_bluescore + ownerdraw UI_BLUE_TEAM_SCORE textfont "hud" textscale .43 forecolor 0 0 0 1 diff --git a/ui/joinserver.menu b/ui/joinserver.menu index bc11b74..7d9954a 100644 --- a/ui/joinserver.menu +++ b/ui/joinserver.menu @@ -59,7 +59,7 @@ { name mapname_column group columns_group - rect 245 89 121 170 + rect 245 89 101 170 style WINDOW_STYLE_FILLED backcolor 0 0 0 0 visible 1 @@ -70,7 +70,7 @@ { name players_column group columns_group - rect 365 89 66 170 + rect 345 89 66 170 style WINDOW_STYLE_FILLED backcolor 0 0 0 0 visible 1 @@ -81,7 +81,7 @@ { name type_column group columns_group - rect 430 89 51 170 + rect 410 89 46 170 style WINDOW_STYLE_FILLED backcolor 0 0 0 0 visible 1 @@ -92,7 +92,18 @@ { name ping_column group columns_group - rect 480 89 59 170 + rect 455 89 44 170 + style WINDOW_STYLE_FILLED + backcolor 0 0 0 0 + visible 1 + decoration + } + + itemDef + { + name punkbuster_column + group columns_group + rect 497 89 23 170 style WINDOW_STYLE_FILLED backcolor 0 0 0 0 visible 1 @@ -106,14 +117,14 @@ itemDef { name serverlist - rect 5 89 533 170 + rect 5 89 533 171 type ITEM_TYPE_LISTBOX style WINDOW_STYLE_EMPTY elementwidth 120 - elementheight 15 + elementheight 12 textfont "hud" - textscale .43 - textaligny -13 + textscale .33 + textaligny -10 elementtype LISTBOX_TEXT feeder FEEDER_SERVERS border 1 @@ -121,7 +132,7 @@ bordercolor 0 0 0 1 outlinecolor .12 .14 .08 1 visible 1 - columns 6 0 3 20 20 40 30 240 40 16 360 5 10 425 20 10 475 20 20 + columns 7 0 3 20 20 40 30 240 40 16 340 5 10 405 20 10 450 20 20 490 10 10 doubleClick { @@ -325,11 +336,11 @@ name empty_filter style WINDOW_STYLE_FILLED type ITEM_TYPE_YESNO - text "Empty:" + rect 340 9 80 16 + text "Empty:" cvar "ui_browserShowEmpty" - textfont "hud" - textscale .43 - rect 144 40 80 16 + textfont "hud" + textscale .43 textstyle 0 textalign ITEM_ALIGN_LEFT textaligny 0 @@ -364,9 +375,9 @@ type ITEM_TYPE_YESNO text "Full:" cvar "ui_browserShowFull" - textfont "hud" - textscale .43 - rect 244 40 80 16 + textfont "hud" + textscale .43 + rect 340 24 80 16 textstyle 0 textalign ITEM_ALIGN_LEFT textaligny 0 @@ -394,6 +405,43 @@ } } + itemDef + { + name pb_filter + style WINDOW_STYLE_FILLED + type ITEM_TYPE_YESNO + text "PunkBuster Enabled:" + rect 144 40 184 16 + textstyle 0 + textalign ITEM_ALIGN_LEFT + textaligny 0 + textalignx 1 + textfont "hud" + textscale .43 + forecolor .12 .14 .08 1 + backcolor 0 0 0 0 + cvar "ui_browserPunkbuster" + visible 1 + + action + { + uiScript updatePunkbuster ; + play "sound/misc/menus/select.wav" ; + } + mouseEnter + { + play "sound/misc/menus/hilite1.wav" ; + setitemcolor pb_filter backcolor .12 .14 .08 1 + setitemcolor pb_filter forecolor .49 .56 .27 1 + } + + mouseExit + { + setitemcolor pb_filter forecolor .12 .14 .08 1 + setitemcolor pb_filter backcolor 0 0 0 0 + } + } + itemDef { name window @@ -654,7 +702,7 @@ style WINDOW_STYLE_FILLED textfont "hud" textscale .43 - rect 365 72 53 18 + rect 345 72 53 18 textalign 0 textalignx 2 // center textaligny 0 @@ -670,7 +718,7 @@ name players_tab_button type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 365 72 53 18 + rect 345 72 53 18 visible 1 mouseEnter @@ -708,7 +756,7 @@ style WINDOW_STYLE_FILLED textfont "hud" textscale .43 - rect 430 72 39 18 + rect 410 72 39 18 textalign 0 textalignx 2 // center textaligny 0 @@ -724,7 +772,7 @@ name type_tab_button type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 430 72 39 18 + rect 410 72 39 18 visible 1 mouseEnter @@ -762,7 +810,7 @@ style WINDOW_STYLE_FILLED textfont "hud" textscale .43 - rect 480 72 39 18 + rect 455 72 36 18 textalign 0 textalignx 2 // center textaligny 0 @@ -778,7 +826,7 @@ name ping_tab_button type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY - rect 480 72 39 18 + rect 455 72 39 18 visible 1 mouseEnter @@ -808,6 +856,74 @@ } } + itemDef + { + name punkbuster_tab + group tabs_group + style WINDOW_STYLE_FILLED + rect 496 72 20 18 + textalign 0 + textalignx 3 + textaligny 0 + forecolor .12 .14 .08 1 + bordercolor 0 0 0 1 + backcolor 0 0 0 0 + visible 1 + border 1 + } + + itemDef + { + name punkbuster_tab + group tabs_group + style WINDOW_STYLE_SHADER + background "gfx/menus/icons/icon_punkbuster" + rect 496 72 20 18 + textalign 0 + textalignx 3 + textaligny 0 + forecolor .12 .14 .08 1 + bordercolor 0 0 0 1 + backcolor 0 0 0 0 + visible 1 + border 1 + } + + itemDef + { + name punkbuster_tab_button + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + rect 496 72 20 18 + visible 1 + + mouseEnter + { + play "sound/misc/menus/hilite1.wav" ; + setitemcolor punkbuster_tab backcolor .12 .14 .08 1 + setitemcolor punkbuster_tab forecolor .49 .56 .27 1 + } + + mouseExit + { + setitemcolor punkbuster_tab forecolor .12 .14 .08 1 + setitemcolor punkbuster_tab backcolor 0 0 0 0 + } + + action + { + play "sound/misc/menus/select.wav" ; + + uiScript ServerSort 6 ; + setitemcolor tabs_group backcolor 0 0 0 0; + setitemcolor tabs_group forecolor .12 .14 .08 1; + setitemcolor punkbuster_tab backcolor .12 .14 .08 1 + setitemcolor punkbuster_tab forecolor .49 .56 .27 1 + setitemcolor columns_group backcolor 0 0 0 0 ; + setitemcolor punkbuster_column backcolor .12 .14 .08 .35; + } + } + //////////////////////////////////////////////////////////////////////// // COLUMN BORDERS //////////////////////////////////////////////////////////////////////// @@ -839,7 +955,7 @@ itemDef { name column_border - rect 245 89 121 171 + rect 245 89 101 171 style WINDOW_STYLE_EMPTY border 1 bordersize 1 @@ -851,7 +967,7 @@ itemDef { name column_border - rect 365 89 66 171 + rect 345 89 66 171 style WINDOW_STYLE_EMPTY border 1 bordersize 1 @@ -863,7 +979,7 @@ itemDef { name column_border - rect 430 89 51 171 + rect 410 89 46 171 style WINDOW_STYLE_EMPTY border 1 bordersize 1 @@ -875,7 +991,7 @@ itemDef { name column_border - rect 480 89 59 171 + rect 455 89 42 171 style WINDOW_STYLE_EMPTY border 1 bordersize 1 diff --git a/ui/menudef.h b/ui/menudef.h index 0236238..0512b7d 100644 --- a/ui/menudef.h +++ b/ui/menudef.h @@ -86,6 +86,7 @@ #define CG_SHOW_HUD_THERMAL 0x00800000 #define CG_SHOW_PLAYER_ALT_WEAPONINFO 0x20000000 #define CG_HIDE_PLAYER_ALT_WEAPONINFO 0x40000000 +#define CG_SHOW_HUD_SNIPERCLIP 0x80000000 #define UI_SHOW_LEADER 0x00000001 @@ -185,6 +186,11 @@ #define UI_OBJECTIVE_PHOTOS 275 +#define UI_RED_TEAM_COUNT 280 +#define UI_BLUE_TEAM_COUNT 281 +#define UI_RED_TEAM_SCORE 282 +#define UI_BLUE_TEAM_SCORE 283 + #define VOICECHAT_GETFLAG "getflag" // command someone to get the flag #define VOICECHAT_OFFENSE "offense" // command someone to go on offense #define VOICECHAT_DEFEND "defend" // command someone to go on defense diff --git a/ui/patch_info.menu b/ui/patch_info.menu index 8ea84b8..5abb4e2 100644 --- a/ui/patch_info.menu +++ b/ui/patch_info.menu @@ -117,7 +117,7 @@ textfont "hud" textscale .43 textalign 0 - textalignx 20 + textalignx 15 textaligny 1 forecolor .12 .14 .08 1 backcolor 0 0 0 0 @@ -129,8 +129,7 @@ action { play "sound/misc/menus/select.wav" ; - close patch_info ; - open patch_location ; + uiScript loadNewVersionFromBrowser ; } mouseEnter @@ -147,45 +146,6 @@ } } - itemDef - { - name browser_button - text "Manual Download" - type ITEM_TYPE_BUTTON - style WINDOW_STYLE_FILLED - rect 250 350 120 20 - textfont "hud" - textscale .43 - textalign 0 - textalignx 5 - textaligny 1 - forecolor .12 .14 .08 1 - backcolor 0 0 0 0 - visible 1 - border 1 - bordercolor 0 0 0 1 - - - action - { - play "sound/misc/menus/select.wav" ; - uiScript loadNewVersionFromBrowser ; - } - - mouseEnter - { - play "sound/misc/menus/hilite1.wav" ; - setitemcolor browser_button backcolor .12 .14 .08 1 - setitemcolor browser_button forecolor .49 .56 .27 1 - } - - mouseExit - { - setitemcolor browser_button forecolor .12 .14 .08 1 - setitemcolor browser_button backcolor 0 0 0 0 - } - } - itemDef { name ignore_button @@ -196,7 +156,7 @@ textfont "hud" textscale .43 textalign 0 - textalignx 30 + textalignx 25 textaligny 1 forecolor .12 .14 .08 1 backcolor 0 0 0 0 diff --git a/ui/setup_misc.menu b/ui/setup_misc.menu index 7261a59..39114e3 100644 --- a/ui/setup_misc.menu +++ b/ui/setup_misc.menu @@ -9,6 +9,49 @@ rect 50 110 432 254 focusColor .49 .56 .27 1 + itemDef + { + name teamscores_multi + style WINDOW_STYLE_FILLED + type ITEM_TYPE_MULTI + text "Team Scores:" + cvar "cg_drawteamscores" + rect 50 14 240 15 + textalign ITEM_ALIGN_RIGHT + textalignx 125 + textaligny 0 + textfont "hud" + textscale .43 + forecolor .12 .14 .08 1 + backcolor 0 0 0 0 + visible 1 + + cvarFloatList + { + "Off" 0 + "Bottom Right" 1 + "Bottom Center" 2 + "Top Right" 3 + "Right" 4 + "Slim" 5 + } + action + { + play "sound/misc/menus/select.wav" ; + } + mouseEnter + { + play "sound/misc/menus/hilite1.wav" ; + setitemcolor teamscores_multi backcolor .12 .14 .08 1 + setitemcolor teamscores_multi forecolor .49 .56 .27 1 + } + mouseExit + { + setitemcolor teamscores_multi forecolor .12 .14 .08 1 + setitemcolor teamscores_multi backcolor 0 0 0 0 + } + } + itemDef { name autoswitch_multi @@ -16,7 +59,7 @@ type ITEM_TYPE_MULTI text "Auto Switch:" cvar "cg_autoswitch" - rect 50 19 240 15 + rect 50 29 240 15 textalign ITEM_ALIGN_RIGHT textalignx 125 textaligny 0 @@ -56,7 +99,7 @@ type ITEM_TYPE_MULTI text "Weapon Selection:" cvar "cg_weaponMenuFast" - rect 50 34 240 15 + rect 50 44 240 15 textalign ITEM_ALIGN_RIGHT textalignx 125 textaligny 0 @@ -95,7 +138,7 @@ type ITEM_TYPE_YESNO text "Auto Reload:" cvar "cg_autoReload" - rect 50 49 240 15 + rect 50 59 240 15 textalign ITEM_ALIGN_RIGHT textalignx 125 textaligny 0 @@ -130,7 +173,7 @@ type ITEM_TYPE_YESNO text "Defer Players:" cvar "cg_deferPlayers" - rect 50 64 240 15 + rect 50 74 240 15 textalign ITEM_ALIGN_RIGHT textalignx 125 textaligny 0 @@ -164,7 +207,7 @@ type ITEM_TYPE_MULTI text "Identify Target:" cvar "cg_drawCrosshairNames" - rect 50 79 240 15 + rect 50 89 240 15 textalign ITEM_ALIGN_RIGHT textalignx 125 textaligny 0 @@ -205,7 +248,7 @@ type ITEM_TYPE_YESNO text "Draw Team Icons:" cvar "cg_drawFriend" - rect 50 94 240 15 + rect 50 104 240 15 textalign ITEM_ALIGN_RIGHT textalignx 125 textaligny 0 @@ -239,7 +282,7 @@ type ITEM_TYPE_MULTI text "Radar Type:" cvar "cg_drawRadar" - rect 50 109 240 15 + rect 50 119 240 15 textalign ITEM_ALIGN_RIGHT textalignx 125 textaligny 0 @@ -279,7 +322,7 @@ type ITEM_TYPE_YESNO text "Draw HUD Icons:" cvar "cg_drawHUDIcons" - rect 50 124 240 15 + rect 50 134 240 15 textalign ITEM_ALIGN_RIGHT textalignx 125 textaligny 0 @@ -311,7 +354,7 @@ name crosshair style WINDOW_STYLE_FILLED text "Crosshair:" - rect 50 139 240 30 + rect 50 149 240 30 ownerdraw UI_CROSSHAIR textalign ITEM_ALIGN_RIGHT textalignx 115 @@ -345,7 +388,7 @@ name brightness_slider style WINDOW_STYLE_FILLED text "Brightness" - rect 70 169 140 15 + rect 70 179 140 15 forecolor .12 .14 .08 1 backcolor 0 0 0 0 textaligny 0 @@ -362,7 +405,7 @@ type ITEM_TYPE_SLIDER text "" cvarfloat "r_gamma" 1 0.5 2 - rect 70 184 128 40 + rect 70 194 128 40 visible 1 action