diff --git a/Source/client/cstrike/player.c b/Source/client/cstrike/player.c old mode 100755 new mode 100644 index 21ea0ed9..42be76d8 --- a/Source/client/cstrike/player.c +++ b/Source/client/cstrike/player.c @@ -14,36 +14,6 @@ .float netflags; .float netpmove_flags; -string sPModels[CS_WEAPON_COUNT - 1] = { - "models/p_knife.mdl", - "models/p_usp.mdl", - "models/p_glock18.mdl", - "models/p_deagle.mdl", - "models/p_p228.mdl", - "models/p_elite.mdl", - "models/p_fiveseven.mdl", - "models/p_m3.mdl", - "models/p_xm1014.mdl", - "models/p_mp5.mdl", - "models/p_p90.mdl", - "models/p_ump45.mdl", - "models/p_mac10.mdl", - "models/p_tmp.mdl", - "models/p_ak47.mdl", - "models/p_sg552.mdl", - "models/p_m4a1.mdl", - "models/p_aug.mdl", - "models/p_scout.mdl", - "models/p_awp.mdl", - "models/p_g3sg1.mdl", - "models/p_sg550.mdl", - "models/p_m249.mdl", - "models/p_c4.mdl", - "models/p_flashbang.mdl", - "models/p_hegrenade.mdl", - "models/p_smokegrenade.mdl" -}; - void Player_ReadEntity(float flIsNew) { player pl = (player)self; diff --git a/Source/client/entry.c b/Source/client/entry.c index 8becc466..ff2ccf38 100644 --- a/Source/client/entry.c +++ b/Source/client/entry.c @@ -39,6 +39,10 @@ void CSQC_Init(float apilevel, string enginename, float engineversion) precache_model("sprites/640_pain.spr"); precache_model("sprites/crosshairs.spr"); + precache_model("sprites/muzzleflash1.spr"); + precache_model("sprites/muzzleflash2.spr"); + precache_model("sprites/muzzleflash3.spr"); + /* Fonts */ FONT_16 = loadfont("16", "fonts/default", "16", -1); FONT_CON = loadfont("font", "", "12", -1); diff --git a/Source/client/player.c b/Source/client/player.c index c12cb078..cabd2753 100644 --- a/Source/client/player.c +++ b/Source/client/player.c @@ -6,15 +6,48 @@ * ****/ -//.float bonecontrol1; //Halflife model format bone controller. On player models, this typically affects the spine's yaw. -//.float bonecontrol2; //Halflife model format bone controller. On player models, this typically affects the spine's yaw. -//.float bonecontrol3; //Halflife model format bone controller. On player models, this typically affects the spine's yaw. -//.float bonecontrol4; //Halflife model format bone controller. On player models, this typically affects the spine's yaw. -//.float bonecontrol5; //Halflife model format bone controller. This typically affects the mouth. -//.float subblendfrac; //Weird animation value specific to halflife models. On player models, this typically affects the spine's pitch. +//.float bonecontrol1; //Half-Life model format bone controller. On player models, this typically affects the spine's yaw. +//.float bonecontrol2; //Half-Life model format bone controller. On player models, this typically affects the spine's yaw. +//.float bonecontrol3; //Half-Life model format bone controller. On player models, this typically affects the spine's yaw. +//.float bonecontrol4; //Half-Life model format bone controller. On player models, this typically affects the spine's yaw. +//.float bonecontrol5; //Half-Life model format bone controller. This typically affects the mouth. +//.float subblendfrac; //Weird animation value specific to Half-Life models. On player models, this typically affects the spine's pitch. //.float basesubblendfrac; // legs part. .float subblend2frac; // Up/Down +// TODO: This needs to be redone. +#ifdef CSTRIKE +string sPModels[CS_WEAPON_COUNT - 1] = { + "models/p_knife.mdl", + "models/p_usp.mdl", + "models/p_glock18.mdl", + "models/p_deagle.mdl", + "models/p_p228.mdl", + "models/p_elite.mdl", + "models/p_fiveseven.mdl", + "models/p_m3.mdl", + "models/p_xm1014.mdl", + "models/p_mp5.mdl", + "models/p_p90.mdl", + "models/p_ump45.mdl", + "models/p_mac10.mdl", + "models/p_tmp.mdl", + "models/p_ak47.mdl", + "models/p_sg552.mdl", + "models/p_m4a1.mdl", + "models/p_aug.mdl", + "models/p_scout.mdl", + "models/p_awp.mdl", + "models/p_g3sg1.mdl", + "models/p_sg550.mdl", + "models/p_m249.mdl", + "models/p_c4.mdl", + "models/p_flashbang.mdl", + "models/p_hegrenade.mdl", + "models/p_smokegrenade.mdl" +}; +#endif + void player::gun_offset(void) { vector v1, v2; @@ -44,7 +77,9 @@ void player::draw(void) // Only bother updating the model if the weapon has changed if (this.lastweapon != this.activeweapon) { if (this.activeweapon) { - // FIXME: setmodel(this.p_model, sPModels[this.weapon - 1]); + #ifdef CSTRIKE + setmodel(this.p_model, sPModels[this.weapon - 1]); + #endif } else { setmodel(this.p_model, ""); } diff --git a/Source/shared/cstrike/basegun.c b/Source/shared/cstrike/basegun.c old mode 100755 new mode 100644 index cf0b56d8..5329e38f --- a/Source/shared/cstrike/basegun.c +++ b/Source/shared/cstrike/basegun.c @@ -175,8 +175,8 @@ float BaseGun_Reload( void ) { self.think = BaseGun_FinishReload; - self.nextthink = time + wptTable[ self.weapon ].fReloadFinished; - self.fAttackFinished = self.nextthink; + self.nextthink = time + wptTable[ self.weapon ].fReloadFinished - 0.1f; // Hack - in some cases input might happen first + self.fAttackFinished = self.nextthink + 0.1f; Animation_ReloadWeapon( self ); Client_SendEvent( self, EV_WEAPON_RELOAD ); diff --git a/Source/shared/pmove.c b/Source/shared/pmove.c index 65025de6..9165890c 100644 --- a/Source/shared/pmove.c +++ b/Source/shared/pmove.c @@ -9,7 +9,7 @@ #define AIRCONTROL #define PHY_JUMP_CHAINWINDOW 0.5 -#define PHY_JUMP_CHAIN 100 +#define PHY_JUMP_CHAIN 100 #define PHY_JUMP_CHAINDECAY 50 #define FL_JUMPRELEASED 4096 diff --git a/cstrike/csprogs.dat b/cstrike/csprogs.dat index 4da07147..5d8eadff 100644 Binary files a/cstrike/csprogs.dat and b/cstrike/csprogs.dat differ diff --git a/cstrike/progs.dat b/cstrike/progs.dat index c32d4e48..fc3a139b 100644 Binary files a/cstrike/progs.dat and b/cstrike/progs.dat differ diff --git a/valve/csprogs.dat b/valve/csprogs.dat index 65c8136f..7b870dd7 100644 Binary files a/valve/csprogs.dat and b/valve/csprogs.dat differ diff --git a/valve/menu.dat b/valve/menu.dat index 6c4698f9..866ec048 100644 Binary files a/valve/menu.dat and b/valve/menu.dat differ diff --git a/valve/progs.dat b/valve/progs.dat index 399c1467..75b2e2ff 100644 Binary files a/valve/progs.dat and b/valve/progs.dat differ