diff --git a/src/client/hud.qc b/src/client/hud.qc index 35b852c..f5b11d2 100644 --- a/src/client/hud.qc +++ b/src/client/hud.qc @@ -165,14 +165,6 @@ HUD_Draw(void) } - - -string g_specmodes[] = { - "Free Camera", - "Third Person", - "First Person" -}; - // specatator main entry (method cloned from FreeHL) // -NOTE! This is for the real, Nuclide-provided spectator. The fake spectator is a // normal player entity with iState set to PLAYER_STATE::NOCLIP. @@ -180,22 +172,5 @@ string g_specmodes[] = { void HUD_DrawSpectator(void) { - Textmenu_Draw(); - - spectator spec = (spectator)pSeat->m_ePlayer; - - drawfont = Font_GetID(FONT_20); - vector vecPos; - string strText; - - strText = sprintf("Tracking: %s", getplayerkeyvalue(spec.spec_ent - 1, "name")); - vecPos[0] = g_hudmins[0] + (g_hudres[0] / 2) - (stringwidth(strText, TRUE, [20,20]) / 2); - vecPos[1] = g_hudmins[1] + g_hudres[1] - 60; - drawstring(vecPos, strText, [20,20], [1,1,1], 1.0f, DRAWFLAG_ADDITIVE); - - strText = sprintf("Mode: %s", g_specmodes[spec.spec_mode]); - vecPos[0] = g_hudmins[0] + (g_hudres[0] / 2) - (stringwidth(strText, TRUE, [20,20]) / 2); - vecPos[1] = g_hudmins[1] + g_hudres[1] - 40; - drawstring(vecPos, strText, [20,20], [1,1,1], 1.0f, DRAWFLAG_ADDITIVE); - + HUD_Draw(); } diff --git a/src/client/init.qc b/src/client/init.qc index 592c2f6..0dc6bd0 100644 --- a/src/client/init.qc +++ b/src/client/init.qc @@ -52,7 +52,7 @@ ClientGame_Init(float apilevel, string enginename, float engineversion) // understanding of pSeat isn't quite there. //if(numclientseats > g_seats.length){numclientseats = g_seats.length;} - for(s = 0; s < g_seats.length; s++){ // < numclientseats + for (s = 0; s < g_seats.length; s++){ // < numclientseats pSeat = &g_seats[s]; pSeatLocal = &g_seatslocal[s]; diff --git a/src/shared/player.qc b/src/shared/player.qc index aca53bd..cceb112 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -1815,15 +1815,15 @@ player::preThink(void){ // we ever care about some delay for this in the future. if(!usingIronSight){ // use this one (plain) - TS_Weapons_ViewAnimation(ironsightRef.iAnim_Idle_Index, 2 ); + TS_Weapons_ViewAnimation(this, ironsightRef.iAnim_Idle_Index, 2 ); }else{ // use this one - TS_Weapons_ViewAnimation(ironsightRef.ironsightdata.iAnim_Idle_Index, 2 ); + TS_Weapons_ViewAnimation(this, ironsightRef.ironsightdata.iAnim_Idle_Index, 2 ); } }else{ //baseRef = *((weapondata_basic_t*) basePRef); - TS_Weapons_ViewAnimation(baseRef.iAnim_Idle_Index, 2 ); + TS_Weapons_ViewAnimation(this, baseRef.iAnim_Idle_Index, 2 ); } }// inventoryEquippedIndex diff --git a/src/shared/util.h b/src/shared/util.h index 3d4a9b5..c55b386 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -287,16 +287,16 @@ void entityRemoveRespawnFlag(CBaseEntity arg_this); #endif -void TS_Weapons_ViewAnimation(int i, float fDuration); -void TS_Weapons_ViewAnimation_noLaserLock(int i, float fDuration); -void TS_Weapons_ViewAnimation_EndIdle(int i, float fDuration); -void TS_Weapons_ViewAnimation_EndIdle_custom(int i, float fDuration, float fIdleEndOffset); +void TS_Weapons_ViewAnimation(player pl, int i, float fDuration); +void TS_Weapons_ViewAnimation_noLaserLock(player pl, int i, float fDuration); +void TS_Weapons_ViewAnimation_EndIdle(player pl, int i, float fDuration); +void TS_Weapons_ViewAnimation_EndIdle_custom(player pl, int i, float fDuration, float fIdleEndOffset); #ifdef CLIENT -void TS_View_PlayAnimation(int iSequence, float fDuration); -void TS_View_PlayAnimation_noLaserLock(int iSequence, float fDuration); -void TS_View_PlayAnimation_EndIdle(int iSequence, float fDuration); -void TS_View_PlayAnimation_EndIdle_custom(int iSequence, float fDuration, float fIdleEndOffset); +void TS_View_PlayAnimation(player pl, int iSequence, float fDuration); +void TS_View_PlayAnimation_noLaserLock(player pl, int iSequence, float fDuration); +void TS_View_PlayAnimation_EndIdle(player pl, int iSequence, float fDuration); +void TS_View_PlayAnimation_EndIdle_custom(player pl, int iSequence, float fDuration, float fIdleEndOffset); #endif diff --git a/src/shared/util.qc b/src/shared/util.qc index f368536..f25c476 100644 --- a/src/shared/util.qc +++ b/src/shared/util.qc @@ -332,14 +332,12 @@ void entityRemoveRespawnFlag(CBaseEntity arg_this){ // Typically call me from weapons in shared script! void -TS_Weapons_ViewAnimation(int i, float fDuration) +TS_Weapons_ViewAnimation(player pl, int i, float fDuration) { //printfline("TS_Weapons_ViewAnimation: %i %.2f", i, fDuration); - player pl = (player)self; - pl.w_idle_next = fDuration; #ifdef CLIENT - TS_View_PlayAnimation(i, fDuration); + TS_View_PlayAnimation(pl, i, fDuration); #else pl.flViewModelFrame = i; #endif @@ -347,14 +345,12 @@ TS_Weapons_ViewAnimation(int i, float fDuration) } void -TS_Weapons_ViewAnimation_noLaserLock(int i, float fDuration) +TS_Weapons_ViewAnimation_noLaserLock(player pl, int i, float fDuration) { //printfline("TS_Weapons_ViewAnimation_noLaserLock: %i %.2f", i, fDuration); - player pl = (player)self; - pl.w_idle_next = fDuration; #ifdef CLIENT - TS_View_PlayAnimation_noLaserLock(i, fDuration); + TS_View_PlayAnimation_noLaserLock(pl, i, fDuration); #else pl.flViewModelFrame = i; #endif @@ -363,14 +359,12 @@ TS_Weapons_ViewAnimation_noLaserLock(int i, float fDuration) void -TS_Weapons_ViewAnimation_EndIdle(int i, float fDuration) +TS_Weapons_ViewAnimation_EndIdle(player pl, int i, float fDuration) { //printfline("TS_Weapons_ViewAnimation_EndIdle: %i %.2f", i, fDuration); - player pl = (player)self; - pl.w_idle_next = fDuration; #ifdef CLIENT - TS_View_PlayAnimation_EndIdle(i, fDuration); + TS_View_PlayAnimation_EndIdle(pl, i, fDuration); #else pl.flViewModelFrame = i; #endif @@ -378,14 +372,12 @@ TS_Weapons_ViewAnimation_EndIdle(int i, float fDuration) } void -TS_Weapons_ViewAnimation_EndIdle_custom(int i, float fDuration, float fIdleEndOffset) +TS_Weapons_ViewAnimation_EndIdle_custom(player pl, int i, float fDuration, float fIdleEndOffset) { //printfline("TS_Weapons_ViewAnimation_EndIdle_custom: %i %.2f %.2f", i, fDuration, fIdleEndOffset); - player pl = (player)self; - pl.w_idle_next = fDuration; #ifdef CLIENT - TS_View_PlayAnimation_EndIdle_custom(i, fDuration, fIdleEndOffset); + TS_View_PlayAnimation_EndIdle_custom(pl, i, fDuration, fIdleEndOffset); #else pl.flViewModelFrame = i; #endif @@ -397,7 +389,7 @@ TS_Weapons_ViewAnimation_EndIdle_custom(int i, float fDuration, float fIdleEndOf #ifdef CLIENT void -TS_View_PlayAnimation(int iSequence, float fDuration){ +TS_View_PlayAnimation(player pl, int iSequence, float fDuration){ /* // TEST!!! @@ -412,8 +404,8 @@ TS_View_PlayAnimation(int iSequence, float fDuration){ */ pSeat->m_eViewModel.frame = (float)iSequence; - player pl = (player)pSeat->m_ePlayer; pl.weapontime = 0.0f; + pl.weaponframe = iSequence; SAVE_STATE(pl.weapontime); //pSeat->m_eViewModel.frame2time = 0; @@ -426,10 +418,10 @@ TS_View_PlayAnimation(int iSequence, float fDuration){ } void -TS_View_PlayAnimation_noLaserLock(int iSequence, float fDuration){ +TS_View_PlayAnimation_noLaserLock(player pl, int iSequence, float fDuration){ pSeat->m_eViewModel.frame = (float)iSequence; - player pl = (player)pSeat->m_ePlayer; pl.weapontime = 0.0f; + pl.weaponframe = iSequence; SAVE_STATE(pl.weapontime); pl.w_freeze_idle_next = -1; //assume this? @@ -438,10 +430,10 @@ TS_View_PlayAnimation_noLaserLock(int iSequence, float fDuration){ void -TS_View_PlayAnimation_EndIdle(int iSequence, float fDuration){ +TS_View_PlayAnimation_EndIdle(player pl, int iSequence, float fDuration){ pSeat->m_eViewModel.frame = (float)iSequence; - player pl = (player)pSeat->m_ePlayer; pl.weapontime = 0.0f; + pl.weaponframe = iSequence; SAVE_STATE(pl.weapontime); // ?? Do we want to do this or not then @@ -452,10 +444,10 @@ TS_View_PlayAnimation_EndIdle(int iSequence, float fDuration){ void -TS_View_PlayAnimation_EndIdle_custom(int iSequence, float fDuration, float fIdleEndOffset){ +TS_View_PlayAnimation_EndIdle_custom(player pl, int iSequence, float fDuration, float fIdleEndOffset){ pSeat->m_eViewModel.frame = (float)iSequence; - player pl = (player)pSeat->m_ePlayer; pl.weapontime = 0.0f; + pl.weaponframe = iSequence; SAVE_STATE(pl.weapontime); pl.lasersightUnlockTime = FALSE; //reset diff --git a/src/shared/weapons.qc b/src/shared/weapons.qc index d691428..4cd7a4e 100644 --- a/src/shared/weapons.qc +++ b/src/shared/weapons.qc @@ -546,7 +546,7 @@ weapon_shotgun_reload( weapondata_shotgun_extra_t* shotgunExtraRef = ary_shotgunExtra[pl.iShotgunExtraDataID]; - TS_Weapons_ViewAnimation((*shotgunExtraRef).shotgunReload1_seq, (*shotgunExtraRef).shotgunReload1_Duration ); + TS_Weapons_ViewAnimation(pl, (*shotgunExtraRef).shotgunReload1_seq, (*shotgunExtraRef).shotgunReload1_Duration ); weapon_base_setWholeAttackDelay(pl, (*shotgunExtraRef).shotgunReload1_Duration); pl.shotgunReloadIndex = 1; @@ -622,14 +622,14 @@ weapon_shotgun_onThink_reloadLogic(player pl, weapondata_gun_t* basePRef, weapon shotgunExtraRef = ary_shotgunExtra[pl.iShotgunExtraDataID]; - TS_Weapons_ViewAnimation((*shotgunExtraRef).shotgunReload3_seq, (*shotgunExtraRef).shotgunReload3_Duration); + TS_Weapons_ViewAnimation(pl, (*shotgunExtraRef).shotgunReload3_seq, (*shotgunExtraRef).shotgunReload3_Duration); weapon_base_setWholeAttackDelay(pl, (*shotgunExtraRef).shotgunReload3_Duration); pl.shotgunReloadIndex = 0; pl.isReloading = FALSE; }else{ shotgunExtraRef = ary_shotgunExtra[pl.iShotgunExtraDataID]; - TS_Weapons_ViewAnimation((*shotgunExtraRef).shotgunReload2_seq, (*shotgunExtraRef).shotgunReload2_Duration); + TS_Weapons_ViewAnimation(pl, (*shotgunExtraRef).shotgunReload2_seq, (*shotgunExtraRef).shotgunReload2_Duration); weapon_base_setWholeAttackDelay(pl, (*shotgunExtraRef).shotgunReload2_Duration); pl.shotgunReloadIndex = 2; @@ -652,7 +652,7 @@ weapon_shotgun_onThink_reloadLogic(player pl, weapondata_gun_t* basePRef, weapon shotgunExtraRef = ary_shotgunExtra[pl.iShotgunExtraDataID]; - TS_Weapons_ViewAnimation((*shotgunExtraRef).shotgunReload3_seq, (*shotgunExtraRef).shotgunReload3_Duration); + TS_Weapons_ViewAnimation(pl, (*shotgunExtraRef).shotgunReload3_seq, (*shotgunExtraRef).shotgunReload3_Duration); weapon_base_setWholeAttackDelay(pl, (*shotgunExtraRef).shotgunReload3_Duration); pl.shotgunReloadIndex = 0; // this will be true when the fire delay expires, but doesn't hurt happening earlier. @@ -1346,13 +1346,13 @@ weapon_ironsight_ToggleIronsight( if(arg_thisWeapon.iIronSight == 0){ weapon_base_setWholeAttackDelay(pl, baseRef.ironsightdata.fAnim_Change_Duration * 0.9 ); - TS_Weapons_ViewAnimation_EndIdle( baseRef.ironsightdata.iAnim_Change_Index, baseRef.ironsightdata.fAnim_Change_Duration ); + TS_Weapons_ViewAnimation_noLaserLock( pl,baseRef.ironsightdata.iAnim_Change_Index, baseRef.ironsightdata.fAnim_Change_Duration ); - //TS_Weapons_ViewAnimation( baseRef.ironsightdata.iAnim_Change_Index, baseRef.ironsightdata.fAnim_Change_Duration ); + //TS_Weapons_ViewAnimation(pl, baseRef.ironsightdata.iAnim_Change_Index, baseRef.ironsightdata.fAnim_Change_Duration ); }else{ weapon_base_setWholeAttackDelay(pl, baseRef.ironsightdata.fAnim_ReChange_Duration * 0.9); - TS_Weapons_ViewAnimation( baseRef.ironsightdata.iAnim_ReChange_Index, baseRef.ironsightdata.fAnim_ReChange_Duration ); + TS_Weapons_ViewAnimation(pl, baseRef.ironsightdata.iAnim_ReChange_Index, baseRef.ironsightdata.fAnim_ReChange_Duration ); } //pl.recentAttackHadAmmo = arg_thisWeapon.iIronSight; //haaaaaaacky sax @@ -1402,7 +1402,7 @@ weapon_gun_Reload( pl.isReloading = TRUE; weapon_base_setWholeAttackDelay(pl, baseRef.fAnim_Reload_Duration); - TS_Weapons_ViewAnimation(baseRef.iAnim_Reload_Index, baseRef.fAnim_Reload_Duration); + TS_Weapons_ViewAnimation(pl, baseRef.iAnim_Reload_Index, baseRef.fAnim_Reload_Duration); //TAGGG TODO - third person model anim //Animation_ReloadWeapon( self ); @@ -1445,7 +1445,7 @@ weapon_gun_Reload_CustomSequence( pl.isReloading = TRUE; weapon_base_setWholeAttackDelay(pl, arg_flReloadSeqTime); - TS_Weapons_ViewAnimation(arg_iReloadSeq, arg_flReloadSeqTime); + TS_Weapons_ViewAnimation(pl, arg_iReloadSeq, arg_flReloadSeqTime); //TAGGG TODO - third person model anim //Animation_ReloadWeapon( self ); @@ -1499,9 +1499,9 @@ weapon_ironsight_Reload( //printfline("not ironsite rite %i", arg_thisWeapon.iIronSight); if(!arg_thisWeapon.iIronSight){ - TS_Weapons_ViewAnimation(baseRef.iAnim_Reload_Index, baseRef.fAnim_Reload_Duration ); + TS_Weapons_ViewAnimation(pl, baseRef.iAnim_Reload_Index, baseRef.fAnim_Reload_Duration ); }else{ - TS_Weapons_ViewAnimation(baseRef.ironsightdata.iAnim_Reload_Index, baseRef.ironsightdata.fAnim_Reload_Duration ); + TS_Weapons_ViewAnimation(pl, baseRef.ironsightdata.iAnim_Reload_Index, baseRef.ironsightdata.fAnim_Reload_Duration ); } //TAGGG TODO - third person model anim. @@ -1594,7 +1594,7 @@ weapon_base_onEquip( //printfline("weapon_base_onEquip: playing deploy anim"); #endif - TS_Weapons_ViewAnimation(baseRef.iAnim_Deploy_Index, baseRef.fAnim_Deploy_Duration); + TS_Weapons_ViewAnimation(pl, baseRef.iAnim_Deploy_Index, baseRef.fAnim_Deploy_Duration); pl.nextAkimboAttackPreference = BITS_AKIMBOCHOICE_LEFT; diff --git a/src/shared/weapons/weapon_ak47.qc b/src/shared/weapons/weapon_ak47.qc index ebeff9f..2dc3f2c 100644 --- a/src/shared/weapons/weapon_ak47.qc +++ b/src/shared/weapons/weapon_ak47.qc @@ -157,9 +157,9 @@ w_ak47_primary(player pl) SoundPitched_Send(pl, SNDP_AK47_FIRE); /* get around protocol limits */ if(!arg_thisWeapon.iIronSight){ - TS_Weapons_ViewAnimation(weaponseq_ak47::shoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_ak47::shoot, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_ak47::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_ak47::shoot2, 31.0f/30.0f); } weapon_ClientEffects(MUZZLEFLASH_ID::RIFLE, SHELLEJECT_ID::_56); diff --git a/src/shared/weapons/weapon_akimbocolts.qc b/src/shared/weapons/weapon_akimbocolts.qc index fb26515..7b71df0 100644 --- a/src/shared/weapons/weapon_akimbocolts.qc +++ b/src/shared/weapons/weapon_akimbocolts.qc @@ -195,9 +195,9 @@ void weapon_akimbocolts_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, //printfline("VM: LEFT"); if(!arg_thisWeapon.iIronSight){ if(arg_thisWeapon.iClipLeft > 0 ){ - TS_Weapons_ViewAnimation(weaponseq_akimbocolts::leftshoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_akimbocolts::leftshoot, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_akimbocolts::leftshootlast, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_akimbocolts::leftshootlast, 31.0f/30.0f); } }else{ // ... @@ -215,9 +215,9 @@ void weapon_akimbocolts_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, //printfline("VM: RIGHT"); if(!arg_thisWeapon.iIronSight){ if(arg_thisWeapon.iClipAkimboLeft > 0 ){ - TS_Weapons_ViewAnimation(weaponseq_akimbocolts::rightshoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_akimbocolts::rightshoot, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_akimbocolts::rightshootlast, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_akimbocolts::rightshootlast, 31.0f/30.0f); } }else{ // ... @@ -240,9 +240,9 @@ void weapon_akimbocolts_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, // both fire types? if(!arg_thisWeapon.iIronSight){ if(arg_thisWeapon.iClipLeft > 0 || arg_thisWeapon.iClipAkimboLeft > 0 ){ - TS_Weapons_ViewAnimation(weaponseq_akimbocolts::linkedshoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_akimbocolts::linkedshoot, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_akimbocolts::linkedshootlast, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_akimbocolts::linkedshootlast, 31.0f/30.0f); } }else{ // ... diff --git a/src/shared/weapons/weapon_barrettm82.qc b/src/shared/weapons/weapon_barrettm82.qc index 7e0d290..4ae4b55 100644 --- a/src/shared/weapons/weapon_barrettm82.qc +++ b/src/shared/weapons/weapon_barrettm82.qc @@ -148,9 +148,9 @@ w_barrettm82_primary(player pl) int r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_barrettm82::shoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_barrettm82::shoot, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_barrettm82::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_barrettm82::shoot2, 31.0f/30.0f); } weapon_ClientEffects(MUZZLEFLASH_ID::RIFLE, SHELLEJECT_ID::_56); diff --git a/src/shared/weapons/weapon_benellim3.qc b/src/shared/weapons/weapon_benellim3.qc index 37a6f0e..110f845 100644 --- a/src/shared/weapons/weapon_benellim3.qc +++ b/src/shared/weapons/weapon_benellim3.qc @@ -177,9 +177,9 @@ w_benellim3_primary(player pl) // why the cast to float here? No idea int r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_benellim3::pump, 29.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_benellim3::pump, 29.0f/35.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_benellim3::pump2, 25.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_benellim3::pump2, 25.0f/35.0f); } arg_thisWeapon.bNeedsPump = FALSE; @@ -201,12 +201,12 @@ w_benellim3_primary(player pl) SoundPitched_Send(pl, SNDP_BENELLIM3_FIRE); if(arg_thisWeapon.iFireMode == BITS_FIREMODE_PUMP){ - TS_Weapons_ViewAnimation(weaponseq_benellim3::shootpump, (31.0f/35.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_benellim3::shootpump, (31.0f/35.0f) ); // no shell! Pumping does that. arg_thisWeapon.bNeedsPump = TRUE; weapon_ShowMuzzleFlash(MUZZLEFLASH_ID::WEIRD); }else{ - TS_Weapons_ViewAnimation(weaponseq_benellim3::shootsemi, (31.0f/35.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_benellim3::shootsemi, (31.0f/35.0f) ); weapon_ClientEffects(MUZZLEFLASH_ID::WEIRD, SHELLEJECT_ID::SHOTGUN_BLUE); } diff --git a/src/shared/weapons/weapon_beretta.qc b/src/shared/weapons/weapon_beretta.qc index 1d1b245..1856323 100644 --- a/src/shared/weapons/weapon_beretta.qc +++ b/src/shared/weapons/weapon_beretta.qc @@ -155,13 +155,13 @@ w_beretta_primary(player pl) if(arg_thisWeapon.iClipLeft > 0){ int r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_beretta::shoot, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta::shoot, 31.0f/35.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_beretta::shoot2, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta::shoot2, 31.0f/35.0f); } }else{ //that was our last bullet? - TS_Weapons_ViewAnimation(weaponseq_beretta::shootempty, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta::shootempty, 31.0f/35.0f); } if(!(arg_thisWeapon.iBitsUpgrade & BITS_WEAPONOPT_SILENCER) ){ diff --git a/src/shared/weapons/weapon_beretta_akimbo.qc b/src/shared/weapons/weapon_beretta_akimbo.qc index f3a6d47..224463c 100644 --- a/src/shared/weapons/weapon_beretta_akimbo.qc +++ b/src/shared/weapons/weapon_beretta_akimbo.qc @@ -230,18 +230,18 @@ void weapon_beretta_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, int if(arg_thisWeapon.iClipLeft > 0 ){ r = (float)input_sequence % 3; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::leftshoot_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::leftshoot_1, 31.0f/31.0f); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::leftshoot2_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::leftshoot2_1, 31.0f/31.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::leftshoots_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::leftshoots_1, 31.0f/31.0f); } }else{ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::leftshootlast_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::leftshootlast_1, 31.0f/31.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::leftshootlasts_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::leftshootlasts_1, 31.0f/31.0f); } } }else{ @@ -262,18 +262,18 @@ void weapon_beretta_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, int if(arg_thisWeapon.iClipAkimboLeft > 0 ){ r = (float)input_sequence % 3; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::rightshoot_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::rightshoot_1, 31.0f/31.0f); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::rightshoot2_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::rightshoot2_1, 31.0f/31.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::rightshoots_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::rightshoots_1, 31.0f/31.0f); } }else{ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::rightshootlast_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::rightshootlast_1, 31.0f/31.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::rightshootlasts_1, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::rightshootlasts_1, 31.0f/31.0f); } } }else{ @@ -297,9 +297,9 @@ void weapon_beretta_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, int // both fire types? if(!arg_thisWeapon.iIronSight){ if(arg_thisWeapon.iClipLeft > 0 || arg_thisWeapon.iClipAkimboLeft > 0){ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::linkedshoot, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::linkedshoot, 31.0f/31.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_beretta_akimbo::linkedshootlast, 31.0f/31.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_beretta_akimbo::linkedshootlast, 31.0f/31.0f); } }else{ // ... diff --git a/src/shared/weapons/weapon_combatknife.qc b/src/shared/weapons/weapon_combatknife.qc index 8c48466..932c9ce 100644 --- a/src/shared/weapons/weapon_combatknife.qc +++ b/src/shared/weapons/weapon_combatknife.qc @@ -150,11 +150,11 @@ w_combatknife_primary(player pl) // Do these go through some kind of cycle, I forget int r = (float)input_sequence % 3; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_combatknife::slash1, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_combatknife::slash1, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_combatknife::left, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_combatknife::left, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_combatknife::right, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_combatknife::right, (31.0f/30.0f) ); } } @@ -192,7 +192,7 @@ w_combatknife_secondary(player pl) printfline("IM A KNIFE I GOT THROWN YES current count: %i", arg_thisWeapon.iCount); if(arg_thisWeapon.iCount > 0){ // another knife left? Bring it up with a draw animation. - TS_Weapons_ViewAnimation(weaponseq_combatknife::draw, (31.0f / 30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_combatknife::draw, (31.0f / 30.0f) ); }else{ #ifdef SERVER diff --git a/src/shared/weapons/weapon_contenderg2.qc b/src/shared/weapons/weapon_contenderg2.qc index a3970c2..1786bfc 100644 --- a/src/shared/weapons/weapon_contenderg2.qc +++ b/src/shared/weapons/weapon_contenderg2.qc @@ -149,9 +149,9 @@ w_contenderg2_primary(player pl) int r = (float)input_sequence % 2; if (r == 0) { - TS_Weapons_ViewAnimation(weaponseq_contenderg2::shoot1, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_contenderg2::shoot1, 31.0f/30.0f); } else { - TS_Weapons_ViewAnimation(weaponseq_contenderg2::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_contenderg2::shoot2, 31.0f/30.0f); } // guessing a shell-eject doesn't happen, could be wrong. diff --git a/src/shared/weapons/weapon_deserteagle.qc b/src/shared/weapons/weapon_deserteagle.qc index ba2fac3..af2f20b 100644 --- a/src/shared/weapons/weapon_deserteagle.qc +++ b/src/shared/weapons/weapon_deserteagle.qc @@ -180,20 +180,20 @@ w_deserteagle_primary(player pl) if(arg_thisWeapon.iClipLeft > 0){ r = (float)input_sequence % 2; if (r == 0) { - TS_Weapons_ViewAnimation(weaponseq_deserteagle::shoot1, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_deserteagle::shoot1, 31.0f/30.0f); } else { - TS_Weapons_ViewAnimation(weaponseq_deserteagle::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_deserteagle::shoot2, 31.0f/30.0f); } }else{ // DONT "EndIdle" THIS ONE! - TS_Weapons_ViewAnimation(weaponseq_deserteagle::shootlast, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_deserteagle::shootlast, 31.0f/30.0f); } }else{ if(arg_thisWeapon.iClipLeft > 0){ - TS_Weapons_ViewAnimation(weaponseq_deserteagle::shootb, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_deserteagle::shootb, 31.0f/30.0f); } else { // DONT "EndIdle" THIS ONE! - TS_Weapons_ViewAnimation(weaponseq_deserteagle::shootblast, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_deserteagle::shootblast, 31.0f/30.0f); } } diff --git a/src/shared/weapons/weapon_fiveseven.qc b/src/shared/weapons/weapon_fiveseven.qc index 1c9c4aa..5261b65 100644 --- a/src/shared/weapons/weapon_fiveseven.qc +++ b/src/shared/weapons/weapon_fiveseven.qc @@ -149,10 +149,10 @@ w_fiveseven_primary(player pl) } if(arg_thisWeapon.iClipLeft > 0){ - TS_Weapons_ViewAnimation(weaponseq_fiveseven::shoot, 31.0f/40.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_fiveseven::shoot, 31.0f/40.0f); }else{ // that was our last bullet? - TS_Weapons_ViewAnimation(weaponseq_fiveseven::shootlast, 31.0f/40.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_fiveseven::shootlast, 31.0f/40.0f); } if(!(arg_thisWeapon.iBitsUpgrade & BITS_WEAPONOPT_SILENCER) ){ diff --git a/src/shared/weapons/weapon_fiveseven_akimbo.qc b/src/shared/weapons/weapon_fiveseven_akimbo.qc index 7f58b65..09e4cc9 100644 --- a/src/shared/weapons/weapon_fiveseven_akimbo.qc +++ b/src/shared/weapons/weapon_fiveseven_akimbo.qc @@ -206,7 +206,7 @@ void weapon_fiveseven_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, i if(finalAkimboChoice == BITS_AKIMBOCHOICE_LEFT){ //printfline("VM: LEFT"); if(!arg_thisWeapon.iIronSight){ - TS_Weapons_ViewAnimation(weaponseq_fiveseven_akimbo::shoot_left, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_fiveseven_akimbo::shoot_left, 31.0f/30.0f); }else{ // ... } @@ -222,7 +222,7 @@ void weapon_fiveseven_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, i }else if(finalAkimboChoice == BITS_AKIMBOCHOICE_RIGHT){ //printfline("VM: RIGHT"); if(!arg_thisWeapon.iIronSight){ - TS_Weapons_ViewAnimation(weaponseq_fiveseven_akimbo::shoot_right, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_fiveseven_akimbo::shoot_right, 31.0f/30.0f); }else{ // ... } @@ -243,7 +243,7 @@ void weapon_fiveseven_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, i // both fire types? if(!arg_thisWeapon.iIronSight){ - TS_Weapons_ViewAnimation(weaponseq_fiveseven_akimbo::shoot_linked, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_fiveseven_akimbo::shoot_linked, 31.0f/30.0f); }else{ // ... } diff --git a/src/shared/weapons/weapon_glock18.qc b/src/shared/weapons/weapon_glock18.qc index 58b1e08..048667d 100644 --- a/src/shared/weapons/weapon_glock18.qc +++ b/src/shared/weapons/weapon_glock18.qc @@ -104,7 +104,6 @@ string w_glock18_pmodel(player pl) { // Do we have the silencer? - player pl = (player)self; weapondynamic_t arg_thisWeapon = pl.ary_myWeapons[pl.inventoryEquippedIndex]; if(!(arg_thisWeapon.iBitsUpgrade & BITS_WEAPONOPT_SILENCER) ){ return (*ary_weaponData[WEAPON_ID::GLOCK18]).sPlayerModelPath; @@ -164,13 +163,13 @@ w_glock18_primary(player pl) // more than 1 bullet left? Typical int r = (float)input_sequence % 2; if (r == 0) { - TS_Weapons_ViewAnimation(weaponseq_glock18::shoot1, (31.0f/30.0f)); + TS_Weapons_ViewAnimation(pl, weaponseq_glock18::shoot1, (31.0f/30.0f)); } else { - TS_Weapons_ViewAnimation(weaponseq_glock18::shoot2, (31.0f/30.0f)); + TS_Weapons_ViewAnimation(pl, weaponseq_glock18::shoot2, (31.0f/30.0f)); } }else{ // Only 1 left? Assume it's about to be gone - TS_Weapons_ViewAnimation(weaponseq_glock18::shootempty, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_glock18::shootempty, (31.0f/30.0f) ); } // TODO. diff --git a/src/shared/weapons/weapon_glock20.qc b/src/shared/weapons/weapon_glock20.qc index fc2ec01..1d0965d 100644 --- a/src/shared/weapons/weapon_glock20.qc +++ b/src/shared/weapons/weapon_glock20.qc @@ -144,13 +144,13 @@ w_glock20_primary(player pl) if(arg_thisWeapon.iClipLeft > 0){ int r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_glock20::shoot1, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_glock20::shoot1, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_glock20::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_glock20::shoot2, 31.0f/30.0f); } }else{ // that was our last bullet? - TS_Weapons_ViewAnimation(weaponseq_glock20::shootempty, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_glock20::shootempty, 31.0f/30.0f); } if(!(arg_thisWeapon.iBitsUpgrade & BITS_WEAPONOPT_SILENCER) ){ diff --git a/src/shared/weapons/weapon_hkpdw.qc b/src/shared/weapons/weapon_hkpdw.qc index 0c01952..d82c229 100644 --- a/src/shared/weapons/weapon_hkpdw.qc +++ b/src/shared/weapons/weapon_hkpdw.qc @@ -153,11 +153,11 @@ w_hkpdw_primary(player pl) int r = (float)input_sequence % 3; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_hkpdw::shoot, 21.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_hkpdw::shoot, 21.0f/30.0f); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_hkpdw::shoot2, 21.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_hkpdw::shoot2, 21.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_hkpdw::shoot3, 21.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_hkpdw::shoot3, 21.0f/30.0f); } if(!(arg_thisWeapon.iBitsUpgrade & BITS_WEAPONOPT_SILENCER) ){ diff --git a/src/shared/weapons/weapon_karate.qc b/src/shared/weapons/weapon_karate.qc index 692ab63..4ce0a41 100644 --- a/src/shared/weapons/weapon_karate.qc +++ b/src/shared/weapons/weapon_karate.qc @@ -155,13 +155,13 @@ w_karate_primary(player pl) int r = (float)input_sequence % 4; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_karate::punch_left, (31.0f/40.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::punch_left, (31.0f/40.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_karate::punch_right, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::punch_right, (31.0f/30.0f) ); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_karate::uppercut, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::uppercut, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_karate::punch_right2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::punch_right2, (31.0f/30.0f) ); } @@ -298,16 +298,16 @@ w_karate_secondary(player pl) //ordinary r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_karate::kick, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::kick, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_karate::sidekick, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::sidekick, (31.0f/30.0f) ); } }else if(meleeAnimToPlay == 1){ //spin kick - TS_Weapons_ViewAnimation(weaponseq_karate::spinkick, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::spinkick, (31.0f/30.0f) ); }else if(meleeAnimToPlay == 2){ //back kick - TS_Weapons_ViewAnimation(weaponseq_karate::backkick, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::backkick, (31.0f/30.0f) ); } // TODO - player model anims for melee? @@ -336,7 +336,7 @@ w_karate_reload(player pl) // allow it. Whatever 'it' is TS_Weapons_PlaySoundDirect(pl, "player/block.wav"); - TS_Weapons_ViewAnimation(weaponseq_karate::block_low, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_karate::block_low, (31.0f/30.0f) ); } pl.flKarateBlockCooldown = time + 1.3f; diff --git a/src/shared/weapons/weapon_katana.qc b/src/shared/weapons/weapon_katana.qc index 44769cd..44a4605 100644 --- a/src/shared/weapons/weapon_katana.qc +++ b/src/shared/weapons/weapon_katana.qc @@ -198,11 +198,11 @@ w_katana_primary(player pl) if(meleeAnimToPlay == 0){ //do that one. - TS_Weapons_ViewAnimation(weaponseq_katana::slash1, (51.0f/33.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_katana::slash1, (51.0f/33.0f) ); }else if(meleeAnimToPlay == 1){ // == 1? - TS_Weapons_ViewAnimation(weaponseq_katana::slash2, (51.0f/33.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_katana::slash2, (51.0f/33.0f) ); }else if(meleeAnimToPlay == 2){ - TS_Weapons_ViewAnimation(weaponseq_katana::slash3, (51.0f/33.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_katana::slash3, (51.0f/33.0f) ); } } diff --git a/src/shared/weapons/weapon_m16a4.qc b/src/shared/weapons/weapon_m16a4.qc index dc6f0f2..9b10118 100644 --- a/src/shared/weapons/weapon_m16a4.qc +++ b/src/shared/weapons/weapon_m16a4.qc @@ -174,24 +174,24 @@ w_m16a4_primary(player pl) if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 4; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_m16a4::shoot1, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m16a4::shoot1, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_m16a4::shoot2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m16a4::shoot2, (31.0f/30.0f) ); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_m16a4::sshoot1, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m16a4::sshoot1, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_m16a4::sshoot2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m16a4::sshoot2, (31.0f/30.0f) ); } }else{ r = (float)input_sequence % 4; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_m16a4::shoot3, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m16a4::shoot3, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_m16a4::shoot4, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m16a4::shoot4, (31.0f/30.0f) ); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_m16a4::sshoot3, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m16a4::sshoot3, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_m16a4::sshoot4, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m16a4::sshoot4, (31.0f/30.0f) ); } } diff --git a/src/shared/weapons/weapon_m4a1.qc b/src/shared/weapons/weapon_m4a1.qc index d6983dc..6ebf963 100644 --- a/src/shared/weapons/weapon_m4a1.qc +++ b/src/shared/weapons/weapon_m4a1.qc @@ -37,7 +37,7 @@ void weapon_m4a1_onColdCock(player pl, weapondynamic_t arg_thisWeapon){ MELEE_HIT_RESPONSE hitRep = weapon_base_coldcock(pl, ary_weaponData[WEAPON_ID::M4A1], arg_thisWeapon, 40, 66); weapon_base_setWholeAttackDelay(pl, 0.73f); - TS_Weapons_ViewAnimation_noLaserLock(weaponseq_m4a1::coldcock, 30.0f/40.0f); + TS_Weapons_ViewAnimation_noLaserLock(pl,weaponseq_m4a1::coldcock, 30.0f/40.0f); arg_thisWeapon.iIronSight = 0; //disable, coldcock returns to non-ironsight look if (hitRep == MELEE_HIT_RESPONSE::NONE ) { @@ -197,24 +197,24 @@ w_m4a1_primary(player pl) if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 4; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_m4a1::shoot1, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m4a1::shoot1, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_m4a1::shoot2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m4a1::shoot2, (31.0f/30.0f) ); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_m4a1::sshoot1, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m4a1::sshoot1, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_m4a1::sshoot2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m4a1::sshoot2, (31.0f/30.0f) ); } }else{ r = (float)input_sequence % 4; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_m4a1::shoot3, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m4a1::shoot3, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_m4a1::shoot4, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m4a1::shoot4, (31.0f/30.0f) ); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_m4a1::sshoot3, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m4a1::sshoot3, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_m4a1::sshoot4, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m4a1::sshoot4, (31.0f/30.0f) ); } } diff --git a/src/shared/weapons/weapon_m60.qc b/src/shared/weapons/weapon_m60.qc index 850c3b2..1fcf3a8 100644 --- a/src/shared/weapons/weapon_m60.qc +++ b/src/shared/weapons/weapon_m60.qc @@ -131,9 +131,9 @@ w_m60_primary(player pl) int r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_m60::shoot, 31.0f/33.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_m60::shoot, 31.0f/33.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_m60::shoot2, 31.0f/33.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_m60::shoot2, 31.0f/33.0f); } weapon_ClientEffects(MUZZLEFLASH_ID::RIFLE, SHELLEJECT_ID::_56); diff --git a/src/shared/weapons/weapon_m61grenade.qc b/src/shared/weapons/weapon_m61grenade.qc index 5f38936..b5de920 100644 --- a/src/shared/weapons/weapon_m61grenade.qc +++ b/src/shared/weapons/weapon_m61grenade.qc @@ -90,9 +90,9 @@ void weapon_m61grenade_onThink(player pl, weapondynamic_t arg_thisWeapon){ if(pl.grenadeFireIndex == 2){ // Release detected, do the throw anim + spawn the grenade soon if(!pl.bGrenadeToss){ - TS_Weapons_ViewAnimation(weaponseq_m61grenade::throw, 11.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_m61grenade::throw, 11.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_m61grenade::throw_slide, 11.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_m61grenade::throw_slide, 11.0f/30.0f); } pl.grenadeFireIndex = 3; // re-use shotgunAddAmmoTime instead, make the var more genericly named maybe??? @@ -105,7 +105,7 @@ void weapon_m61grenade_onThink(player pl, weapondynamic_t arg_thisWeapon){ //printfline("Remove grenade? Count:%i", arg_thisWeapon.iCount); if(arg_thisWeapon.iCount > 0){ - TS_Weapons_ViewAnimation(weaponseq_m61grenade::draw, 31.0f / 40.0f ); + TS_Weapons_ViewAnimation(pl, weaponseq_m61grenade::draw, 31.0f / 40.0f ); printfline("I set grenadeFireIndex to 0, B!"); pl.grenadeFireIndex = 0; weapon_base_setWholeAttackDelay(pl, (31.0f/40.0f)); @@ -187,7 +187,7 @@ void weapon_grenade_onInputPress(player pl, weapondynamic_t arg_thisWeapon, int printfline("WHAT THE heckin heck IS THIS %.2f", time); pl.grenadeSpawnTime = -1; // not yet! pl.grenadeHeldDuration = 0; - TS_Weapons_ViewAnimation(weaponseq_m61grenade::start, (31.0f/35.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_m61grenade::start, (31.0f/35.0f) ); weapon_base_setWholeAttackDelay(pl, 0.6); } } diff --git a/src/shared/weapons/weapon_mac10.qc b/src/shared/weapons/weapon_mac10.qc index 12857d4..d09aef9 100644 --- a/src/shared/weapons/weapon_mac10.qc +++ b/src/shared/weapons/weapon_mac10.qc @@ -171,32 +171,32 @@ w_mac10_primary(player pl) int r = (float)input_sequence % 6; if(!arg_thisWeapon.iIronSight){ if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_mac10::shoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::shoot, 31.0f/30.0f); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_mac10::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::shoot2, 31.0f/30.0f); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_mac10::shoot3, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::shoot3, 31.0f/30.0f); }else if(r == 3){ - TS_Weapons_ViewAnimation(weaponseq_mac10::sshoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::sshoot, 31.0f/30.0f); }else if(r == 4){ - TS_Weapons_ViewAnimation(weaponseq_mac10::sshoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::sshoot2, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_mac10::sshoot3, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::sshoot3, 31.0f/30.0f); } }else{ r = (float)input_sequence % 6; if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_mac10::shootb, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::shootb, 31.0f/30.0f); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_mac10::shootb2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::shootb2, 31.0f/30.0f); }else if(r == 3){ - TS_Weapons_ViewAnimation(weaponseq_mac10::shootb3, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::shootb3, 31.0f/30.0f); }else if(r == 4){ - TS_Weapons_ViewAnimation(weaponseq_mac10::sshootb, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::sshootb, 31.0f/30.0f); }else if(r == 5){ - TS_Weapons_ViewAnimation(weaponseq_mac10::sshootb2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::sshootb2, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_mac10::sshootb3, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mac10::sshootb3, 31.0f/30.0f); } } diff --git a/src/shared/weapons/weapon_miniuzi.qc b/src/shared/weapons/weapon_miniuzi.qc index 468efc4..2ccf59a 100644 --- a/src/shared/weapons/weapon_miniuzi.qc +++ b/src/shared/weapons/weapon_miniuzi.qc @@ -171,24 +171,24 @@ w_miniuzi_primary(player pl) if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 4; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi::shoot, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi::shoot, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi::shoot2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi::shoot2, (31.0f/30.0f) ); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi::sshoot, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi::sshoot, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_miniuzi::sshoot2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi::sshoot2, (31.0f/30.0f) ); } }else{ r = (float)input_sequence % 4; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi::shootb, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi::shootb, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi::shootb2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi::shootb2, (31.0f/30.0f) ); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi::sshootb, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi::sshootb, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_miniuzi::sshootb2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi::sshootb2, (31.0f/30.0f) ); } } diff --git a/src/shared/weapons/weapon_miniuzi_akimbo.qc b/src/shared/weapons/weapon_miniuzi_akimbo.qc index e226c8c..24ddfbc 100644 --- a/src/shared/weapons/weapon_miniuzi_akimbo.qc +++ b/src/shared/weapons/weapon_miniuzi_akimbo.qc @@ -216,7 +216,7 @@ void weapon_miniuzi_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, int if(finalAkimboChoice == BITS_AKIMBOCHOICE_LEFT){ //printfline("VM: UZI: LEFT"); - TS_Weapons_ViewAnimation(weaponseq_miniuzi_akimbo::akimbo_left_shoot, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi_akimbo::akimbo_left_shoot, (31.0f/30.0f) ); weapon_base_setLeftAttackDelay(pl, (*ary_weaponData[pl.activeweapon]).fAttackDelay); if(arg_thisWeapon.iFireModeAkimbo == BITS_FIREMODE_AKIMBO_FULL_AUTO){ @@ -227,7 +227,7 @@ void weapon_miniuzi_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, int }else if(finalAkimboChoice == BITS_AKIMBOCHOICE_RIGHT){ //printfline("VM: UZI: RIGHT"); - TS_Weapons_ViewAnimation(weaponseq_miniuzi_akimbo::akimbo_right_shoot, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi_akimbo::akimbo_right_shoot, (31.0f/30.0f) ); weapon_base_setRightAttackDelay(pl, (*ary_weaponData[pl.activeweapon]).fAttackDelay); if(arg_thisWeapon.iFireModeAkimbo == BITS_FIREMODE_AKIMBO_FULL_AUTO){ @@ -244,17 +244,17 @@ void weapon_miniuzi_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, int //printfline("VM: UZI: BOTH"); r = (float)input_sequence % 6; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi_akimbo::akimbo_shoot1, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi_akimbo::akimbo_shoot1, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi_akimbo::akimbo_shoot2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi_akimbo::akimbo_shoot2, (31.0f/30.0f) ); }else if(r == 2){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi_akimbo::akimbo_shoot3, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi_akimbo::akimbo_shoot3, (31.0f/30.0f) ); }else if(r == 3){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi_akimbo::akimbo_sshoot1, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi_akimbo::akimbo_sshoot1, (31.0f/30.0f) ); }else if(r == 4){ - TS_Weapons_ViewAnimation(weaponseq_miniuzi_akimbo::akimbo_sshoot2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi_akimbo::akimbo_sshoot2, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_miniuzi_akimbo::akimbo_sshoot3, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_miniuzi_akimbo::akimbo_sshoot3, (31.0f/30.0f) ); } pl.akimboDualFireToleranceTime = 0; diff --git a/src/shared/weapons/weapon_mossberg500.qc b/src/shared/weapons/weapon_mossberg500.qc index 50c0db3..78e26b1 100644 --- a/src/shared/weapons/weapon_mossberg500.qc +++ b/src/shared/weapons/weapon_mossberg500.qc @@ -195,13 +195,13 @@ w_mossberg500_primary(player pl) weapon_EjectShell(SHELLEJECT_ID::SHOTGUN_GOLD); if(!arg_thisWeapon.iIronSight){ - TS_Weapons_ViewAnimation(weaponseq_mossberg500::pump, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mossberg500::pump, 31.0f/35.0f); }else{ int r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_mossberg500::pumpb, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mossberg500::pumpb, 31.0f/35.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_mossberg500::pumpb2, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mossberg500::pumpb2, 31.0f/35.0f); } } @@ -223,9 +223,9 @@ w_mossberg500_primary(player pl) //if(arg_thisWeapon.iFireMode == BITS_FIREMODE_PUMP){ if(!arg_thisWeapon.iIronSight){ - TS_Weapons_ViewAnimation(weaponseq_mossberg500::shoot, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mossberg500::shoot, 31.0f/35.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_mossberg500::shootb, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mossberg500::shootb, 31.0f/35.0f); } // no shell! Pumping does that. diff --git a/src/shared/weapons/weapon_mp5k.qc b/src/shared/weapons/weapon_mp5k.qc index 09b0b29..27dd6c6 100644 --- a/src/shared/weapons/weapon_mp5k.qc +++ b/src/shared/weapons/weapon_mp5k.qc @@ -178,16 +178,16 @@ w_mp5k_primary(player pl) if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_mp5k::shoot1, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mp5k::shoot1, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_mp5k::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mp5k::shoot2, 31.0f/30.0f); } }else{ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_mp5k::shoot1b, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mp5k::shoot1b, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_mp5k::shoot2b, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mp5k::shoot2b, 31.0f/30.0f); } } diff --git a/src/shared/weapons/weapon_mp5sd.qc b/src/shared/weapons/weapon_mp5sd.qc index 7efd10f..8af792a 100644 --- a/src/shared/weapons/weapon_mp5sd.qc +++ b/src/shared/weapons/weapon_mp5sd.qc @@ -158,11 +158,11 @@ w_mp5sd_primary(player pl) int r = (float)input_sequence % 3; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_mp5sd::shoot1, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mp5sd::shoot1, 31.0f/30.0f); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_mp5sd::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mp5sd::shoot2, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_mp5sd::shoot3, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_mp5sd::shoot3, 31.0f/30.0f); } weapon_EjectShell(SHELLEJECT_ID::_9MM); diff --git a/src/shared/weapons/weapon_ragingbull.qc b/src/shared/weapons/weapon_ragingbull.qc index 8afbd84..660692c 100644 --- a/src/shared/weapons/weapon_ragingbull.qc +++ b/src/shared/weapons/weapon_ragingbull.qc @@ -145,9 +145,9 @@ w_ragingbull_primary(player pl) int r = (float)input_sequence % 2; if (r == 0) { - TS_Weapons_ViewAnimation(weaponseq_ragingbull::shoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_ragingbull::shoot, 31.0f/30.0f); } else { - TS_Weapons_ViewAnimation(weaponseq_ragingbull::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_ragingbull::shoot2, 31.0f/30.0f); } // no shell eject diff --git a/src/shared/weapons/weapon_rugermk1.qc b/src/shared/weapons/weapon_rugermk1.qc index 037a46f..0a58fbe 100644 --- a/src/shared/weapons/weapon_rugermk1.qc +++ b/src/shared/weapons/weapon_rugermk1.qc @@ -142,9 +142,9 @@ w_rugermk1_primary(player pl) int r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_rugermk1::shoot1, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_rugermk1::shoot1, 31.0f/35.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_rugermk1::shoot2, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_rugermk1::shoot2, 31.0f/35.0f); } weapon_EjectShell(SHELLEJECT_ID::GENERIC); diff --git a/src/shared/weapons/weapon_sawedoff.qc b/src/shared/weapons/weapon_sawedoff.qc index d6eb31b..ce6e74a 100644 --- a/src/shared/weapons/weapon_sawedoff.qc +++ b/src/shared/weapons/weapon_sawedoff.qc @@ -35,7 +35,7 @@ void weapon_sawedoff_onColdCock(player pl, weapondynamic_t arg_thisWeapon){ MELEE_HIT_RESPONSE hitRep = weapon_base_coldcock(pl, ary_weaponData[WEAPON_ID::SAWEDOFF], arg_thisWeapon, 40, 66); weapon_base_setWholeAttackDelay(pl, 0.73f); - TS_Weapons_ViewAnimation_noLaserLock(weaponseq_sawedoff::coldcock, (30.0f/30.0f) ); + TS_Weapons_ViewAnimation_noLaserLock(pl,weaponseq_sawedoff::coldcock, (30.0f/30.0f) ); arg_thisWeapon.iIronSight = 0; // disable, coldcock returns to non-ironsight look @@ -186,16 +186,16 @@ w_sawedoff_primary(player pl) if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_sawedoff::shoot1, 31.0f/33.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_sawedoff::shoot1, 31.0f/33.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_sawedoff::shoot2, 31.0f/33.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_sawedoff::shoot2, 31.0f/33.0f); } }else{ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_sawedoff::shoot1b, 31.0f/33.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_sawedoff::shoot1b, 31.0f/33.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_sawedoff::shoot2b, 31.0f/33.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_sawedoff::shoot2b, 31.0f/33.0f); } } diff --git a/src/shared/weapons/weapon_sealknife.qc b/src/shared/weapons/weapon_sealknife.qc index 0ad5ed9..b8feca8 100644 --- a/src/shared/weapons/weapon_sealknife.qc +++ b/src/shared/weapons/weapon_sealknife.qc @@ -141,11 +141,11 @@ w_sealknife_primary(player pl) // actually do this animation the same regardless as far as we know. int r = (float)input_sequence % 3; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_sealknife::slash1, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_sealknife::slash1, (31.0f/30.0f) ); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_sealknife::slash2, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_sealknife::slash2, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_sealknife::slash3, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_sealknife::slash3, (31.0f/30.0f) ); } } @@ -178,7 +178,7 @@ w_sealknife_secondary(player pl) if(arg_thisWeapon.iCount > 0){ // another knife left? Bring it up with a draw animation. - TS_Weapons_ViewAnimation(weaponseq_sealknife::draw, (31.0f / 30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_sealknife::draw, (31.0f / 30.0f) ); }else{ #ifdef SERVER // No knives left? Unequip, pick something else. diff --git a/src/shared/weapons/weapon_skorpion.qc b/src/shared/weapons/weapon_skorpion.qc index 96c8682..c6c031c 100644 --- a/src/shared/weapons/weapon_skorpion.qc +++ b/src/shared/weapons/weapon_skorpion.qc @@ -136,11 +136,11 @@ w_skorpion_primary(player pl) int r = (float)input_sequence % 3; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_skorpion::fire1, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_skorpion::fire1, 31.0f/30.0f); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_skorpion::fire2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_skorpion::fire2, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_skorpion::fire3, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_skorpion::fire3, 31.0f/30.0f); } weapon_ClientEffects(MUZZLEFLASH_ID::SMALL, SHELLEJECT_ID::GENERIC); diff --git a/src/shared/weapons/weapon_skorpion_akimbo.qc b/src/shared/weapons/weapon_skorpion_akimbo.qc index acf730c..4f11b8c 100644 --- a/src/shared/weapons/weapon_skorpion_akimbo.qc +++ b/src/shared/weapons/weapon_skorpion_akimbo.qc @@ -183,7 +183,7 @@ void weapon_skorpion_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, in if(finalAkimboChoice == BITS_AKIMBOCHOICE_LEFT){ //printfline("VM: UZI: LEFT"); - TS_Weapons_ViewAnimation(weaponseq_skorpion_akimbo::fireleft, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_skorpion_akimbo::fireleft, (31.0f/30.0f) ); weapon_base_setLeftAttackDelay(pl, (*ary_weaponData[pl.activeweapon]).fAttackDelay); if(arg_thisWeapon.iFireModeAkimbo == BITS_FIREMODE_AKIMBO_FULL_AUTO){ @@ -194,7 +194,7 @@ void weapon_skorpion_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, in }else if(finalAkimboChoice == BITS_AKIMBOCHOICE_RIGHT){ //printfline("VM: UZI: RIGHT"); - TS_Weapons_ViewAnimation(weaponseq_skorpion_akimbo::fireright, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_skorpion_akimbo::fireright, (31.0f/30.0f) ); weapon_base_setRightAttackDelay(pl, (*ary_weaponData[pl.activeweapon]).fAttackDelay); if(arg_thisWeapon.iFireModeAkimbo == BITS_FIREMODE_AKIMBO_FULL_AUTO){ @@ -211,9 +211,9 @@ void weapon_skorpion_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, in //printfline("VM: UZI: BOTH"); r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_skorpion_akimbo::fire1ak, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_skorpion_akimbo::fire1ak, (31.0f/30.0f) ); }else{ - TS_Weapons_ViewAnimation(weaponseq_skorpion_akimbo::fire2ak, (31.0f/30.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_skorpion_akimbo::fire2ak, (31.0f/30.0f) ); } pl.akimboDualFireToleranceTime = 0; diff --git a/src/shared/weapons/weapon_socommk23.qc b/src/shared/weapons/weapon_socommk23.qc index d1afad7..640a016 100644 --- a/src/shared/weapons/weapon_socommk23.qc +++ b/src/shared/weapons/weapon_socommk23.qc @@ -170,16 +170,16 @@ w_socommk23_primary(player pl) if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_socommk23::shootb1, (31.0f/30.0f)); + TS_Weapons_ViewAnimation(pl, weaponseq_socommk23::shootb1, (31.0f/30.0f)); } else { - TS_Weapons_ViewAnimation(weaponseq_socommk23::shootb2, (31.0f/30.0f)); + TS_Weapons_ViewAnimation(pl, weaponseq_socommk23::shootb2, (31.0f/30.0f)); } }else{ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_socommk23::shootc1, (31.0f/30.0f)); + TS_Weapons_ViewAnimation(pl, weaponseq_socommk23::shootc1, (31.0f/30.0f)); } else { - TS_Weapons_ViewAnimation(weaponseq_socommk23::shootc2, (31.0f/30.0f)); + TS_Weapons_ViewAnimation(pl, weaponseq_socommk23::shootc2, (31.0f/30.0f)); } } diff --git a/src/shared/weapons/weapon_socommk23_akimbo.qc b/src/shared/weapons/weapon_socommk23_akimbo.qc index 6f66898..4e2cbdd 100644 --- a/src/shared/weapons/weapon_socommk23_akimbo.qc +++ b/src/shared/weapons/weapon_socommk23_akimbo.qc @@ -247,16 +247,16 @@ void weapon_socommk23_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, i if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_left1, (31.0f/40.0f), 2 ); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_left1, (31.0f/40.0f), 2 ); } else { - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_left2, (31.0f/40.0f), 2 ); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_left2, (31.0f/40.0f), 2 ); } }else{ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_leftb1, (31.0f/40.0f), 2 ); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_leftb1, (31.0f/40.0f), 2 ); } else { - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_leftb2, (31.0f/40.0f), 2 ); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_leftb2, (31.0f/40.0f), 2 ); } } @@ -273,16 +273,16 @@ void weapon_socommk23_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, i if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_right1, (31.0f/40.0f), 2 ); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_right1, (31.0f/40.0f), 2 ); } else { - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_right2, (31.0f/40.0f), 2 ); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_right2, (31.0f/40.0f), 2 ); } }else{ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_rightb1, (31.0f/40.0f), 2 ); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_rightb1, (31.0f/40.0f), 2 ); } else { - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_rightb2, (31.0f/40.0f), 2 ); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_rightb2, (31.0f/40.0f), 2 ); } } @@ -303,16 +303,16 @@ void weapon_socommk23_akimbo_attack(player pl, weapondynamic_t arg_thisWeapon, i // both fire types? if(!arg_thisWeapon.iIronSight){ if(arg_thisWeapon.iClipLeft > 0){ - TS_Weapons_ViewAnimation_EndIdle_custom( weaponseq_socommk23_akimbo::shoot_linked, (31.0f/40.0f), 2); + TS_Weapons_ViewAnimation_EndIdle_custom( pl,weaponseq_socommk23_akimbo::shoot_linked, (31.0f/40.0f), 2); }else{ //that is... insanely situational. - TS_Weapons_ViewAnimation( weaponseq_socommk23_akimbo::shoot_linked_last, 31.0f/40.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_socommk23_akimbo::shoot_linked_last, 31.0f/40.0f); } }else{ // not ironsight eh? WE DONT HAVE A LINKED ANIM FOR THAT. // but hey, original TS had this issue too at least, it just did no anim here. // Or force idle, whatever. - TS_Weapons_ViewAnimation( weaponseq_socommk23_akimbo::idleb, 1.5f ); + TS_Weapons_ViewAnimation(pl, weaponseq_socommk23_akimbo::idleb, 1.5f ); } weapon_base_setWholeAttackDelay(pl, (*ary_weaponData[pl.activeweapon]).fAttackDelay * 1); diff --git a/src/shared/weapons/weapon_spas12.qc b/src/shared/weapons/weapon_spas12.qc index e7d26de..fb12457 100644 --- a/src/shared/weapons/weapon_spas12.qc +++ b/src/shared/weapons/weapon_spas12.qc @@ -169,9 +169,9 @@ w_spas12_primary(player pl) int r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_spas12::pump, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_spas12::pump, 31.0f/35.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_spas12::pump2, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_spas12::pump2, 31.0f/35.0f); } arg_thisWeapon.bNeedsPump = FALSE; @@ -191,12 +191,12 @@ w_spas12_primary(player pl) SoundPitched_Send(pl, SNDP_SPAS12_FIRE); if(arg_thisWeapon.iFireMode == BITS_FIREMODE_PUMP){ - TS_Weapons_ViewAnimation(weaponseq_spas12::shootpump, (31.0f/35.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_spas12::shootpump, (31.0f/35.0f) ); // no shell! Pumping does that. arg_thisWeapon.bNeedsPump = TRUE; weapon_ShowMuzzleFlash(MUZZLEFLASH_ID::WEIRD); }else{ - TS_Weapons_ViewAnimation(weaponseq_spas12::shootsemi, (31.0f/35.0f) ); + TS_Weapons_ViewAnimation(pl, weaponseq_spas12::shootsemi, (31.0f/35.0f) ); weapon_ClientEffects(MUZZLEFLASH_ID::WEIRD, SHELLEJECT_ID::SHOTGUN); } diff --git a/src/shared/weapons/weapon_steyraug.qc b/src/shared/weapons/weapon_steyraug.qc index 92b574f..bd67862 100644 --- a/src/shared/weapons/weapon_steyraug.qc +++ b/src/shared/weapons/weapon_steyraug.qc @@ -150,7 +150,7 @@ w_steyraug_primary(player pl) SoundPitched_Send(pl, SNDP_STEYRAUG_FIRE_SIL); } - TS_Weapons_ViewAnimation(weaponseq_steyraug::shoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_steyraug::shoot, 31.0f/30.0f); if(!(arg_thisWeapon.iBitsUpgrade & BITS_WEAPONOPT_SILENCER) ){ weapon_ClientEffects(MUZZLEFLASH_ID::RIFLE, SHELLEJECT_ID::_56); diff --git a/src/shared/weapons/weapon_steyrtmp.qc b/src/shared/weapons/weapon_steyrtmp.qc index 11ed1f4..09ebd4a 100644 --- a/src/shared/weapons/weapon_steyrtmp.qc +++ b/src/shared/weapons/weapon_steyrtmp.qc @@ -165,16 +165,16 @@ w_steyrtmp_primary(player pl) if(!arg_thisWeapon.iIronSight){ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_steyrtmp::shoot, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_steyrtmp::shoot, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_steyrtmp::shoot2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_steyrtmp::shoot2, 31.0f/30.0f); } }else{ r = (float)input_sequence % 2; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_steyrtmp::shootb, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_steyrtmp::shootb, 31.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_steyrtmp::shootb2, 31.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_steyrtmp::shootb2, 31.0f/30.0f); } } diff --git a/src/shared/weapons/weapon_ump.qc b/src/shared/weapons/weapon_ump.qc index 1135879..8c99067 100644 --- a/src/shared/weapons/weapon_ump.qc +++ b/src/shared/weapons/weapon_ump.qc @@ -156,11 +156,11 @@ w_ump_primary(player pl) int r = (float)input_sequence % 3; if(r == 0){ - TS_Weapons_ViewAnimation(weaponseq_ump::shoot1, 19.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_ump::shoot1, 19.0f/30.0f); }else if(r == 1){ - TS_Weapons_ViewAnimation(weaponseq_ump::shoot2, 19.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_ump::shoot2, 19.0f/30.0f); }else{ - TS_Weapons_ViewAnimation(weaponseq_ump::shoot3, 19.0f/30.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_ump::shoot3, 19.0f/30.0f); } if(!(arg_thisWeapon.iBitsUpgrade & BITS_WEAPONOPT_SILENCER) ){ diff --git a/src/shared/weapons/weapon_usas12.qc b/src/shared/weapons/weapon_usas12.qc index cb98378..dbffeae 100644 --- a/src/shared/weapons/weapon_usas12.qc +++ b/src/shared/weapons/weapon_usas12.qc @@ -131,7 +131,7 @@ w_usas12_primary(player pl) SoundPitched_Send(pl, SNDP_USAS12_FIRE); - TS_Weapons_ViewAnimation(weaponseq_usas12::shootsemi, 31.0f/35.0f); + TS_Weapons_ViewAnimation(pl, weaponseq_usas12::shootsemi, 31.0f/35.0f); weapon_ClientEffects(MUZZLEFLASH_ID::WEIRD, SHELLEJECT_ID::SHOTGUN);