diff --git a/src/client/cmds.qc b/src/client/cmds.qc index 907ca82..cb7b08f 100644 --- a/src/client/cmds.qc +++ b/src/client/cmds.qc @@ -121,6 +121,10 @@ ClientGame_ConsoleCommand(void) //sendevent("WeaponDrop", ""); TS_playerDropWeapon(); //I do it fine. break; + + case "forcespawn": + sendevent("GamePlayerSpawn", ""); + break; default: return (0); diff --git a/src/client/init.qc b/src/client/init.qc index 0dc6bd0..1f60648 100644 --- a/src/client/init.qc +++ b/src/client/init.qc @@ -95,6 +95,7 @@ ClientGame_Init(float apilevel, string enginename, float engineversion) registercommand("buy"); registercommand("motd"); + registercommand("forcespawn"); //registercommand("chooseteam"); // NO NEED! See CSEv_DropWeapon in nuclide's src/server/weapons.qc, that gets called. @@ -152,6 +153,8 @@ ClientGame_Init(float apilevel, string enginename, float engineversion) void ClientGame_InitDone(void) { + //if (serverkeyfloat("sv_playerslots") > 1) + //VGUI_ShowMOTD(); } diff --git a/src/client/inventory_logic_draw.qc b/src/client/inventory_logic_draw.qc index 238cc55..6d1eda8 100644 --- a/src/client/inventory_logic_draw.qc +++ b/src/client/inventory_logic_draw.qc @@ -23,8 +23,8 @@ drawWeaponOptionBar( void drawPlayerInventory_TopBar(int arg_iSlotSelected, BOOL arg_fBuyMode) { - vector vWeaponsBar_drawLoc; - vector vWeaponsBar_drawBase; + vector vWeaponsBar_drawLoc = g_vec_null; + vector vWeaponsBar_drawBase = g_vec_null; if(arg_fBuyMode){ // draw the pre-bar diff --git a/src/client/ui_buymenu.qc b/src/client/ui_buymenu.qc index 19cbd89..3eee336 100644 --- a/src/client/ui_buymenu.qc +++ b/src/client/ui_buymenu.qc @@ -927,7 +927,7 @@ drawBuyButton( arg_opac = 0.71; } - vector vLabelPos; + vector vLabelPos = g_vec_null; BOOL mouseHovered = FALSE; // Draw the button label @@ -1179,6 +1179,7 @@ buymenu_btn_UseNewConfig_clicked(CBuyMenu_BasicButton* arg_this) // TODO - check to see whether the config we just used was empty or not, to affect this message... CSQC_Parse_CenterPrint("Using new config.\n"); + pSeat->m_bInterfaceFocused = false; UI_ChangeScreen(UI_SCREEN::NONE); }//buymenu_btn_UseNewConfig_clicked diff --git a/src/client/ui_eventgrabber.qc b/src/client/ui_eventgrabber.qc index d98764d..aaaee24 100644 --- a/src/client/ui_eventgrabber.qc +++ b/src/client/ui_eventgrabber.qc @@ -91,9 +91,11 @@ void gFun_UI_EventGrabber_Initialize(void){ void gFun_UI_EventGrabber_Show(void){ g_UI_EventGrabber.FlagAdd(1); + g_UI_EventGrabber.m_bVisible = true; } void gFun_UI_EventGrabber_Hide(void){ g_UI_EventGrabber.FlagRemove(1); + g_UI_EventGrabber.m_bVisible = false; } diff --git a/src/client/util.qc b/src/client/util.qc index 597d726..d115c09 100644 --- a/src/client/util.qc +++ b/src/client/util.qc @@ -54,7 +54,7 @@ drawSpriteNumber( int digitCount = 0; int totalDrawWidth = 0; - vector vDrawPosYet; + vector vDrawPosYet = g_vec_null; for(int i = arg_digits; i >= 1; i--){ vDrawPosYet.x = arg_draw_x + (arg_digits - i) * spriteWidth + leftChange; vDrawPosYet.y = arg_draw_y + 0; @@ -155,8 +155,8 @@ void Gfx_ScalePicPreserveBounds(string sImage, vector arg_vDrawPos, vector vSize, vector vScale, vector vInset, vector vRGB, float flOpac) { vector srcpos = [vInset[0], vInset[1]]; - vector srcsz; - vector sz; + vector srcsz = g_vec_null; + vector sz = g_vec_null; //srcsz = vSize; srcsz[0] = 1.0 - (vInset[0]*2) ; @@ -165,7 +165,7 @@ Gfx_ScalePicPreserveBounds(string sImage, vector arg_vDrawPos, vector vSize, vec sz[0] = vSize[0] * vScale[0]; sz[1] = vSize[1] * vScale[1]; - vector vecOff;// = [0,0]; + vector vecOff = g_vec_null;// = [0,0]; vecOff[0] = -sz[0]/2; vecOff[1] = -sz[1]/2; diff --git a/src/client/view.qc b/src/client/view.qc index b8a0f3f..7946c0a 100644 --- a/src/client/view.qc +++ b/src/client/view.qc @@ -202,13 +202,13 @@ TS_View_ChangeViewModelPost(void) * thus we need to update all the net variables to * make sure these updates are recognized. this is * vile but it'll have to do for now */ - SAVE_STATE(pl.w_attack_next); - SAVE_STATE(pl.w_idle_next); - SAVE_STATE(pl.viewzoom); - SAVE_STATE(pl.weapontime); + SAVE_STATE(pl.w_attack_next) + SAVE_STATE(pl.w_idle_next) + SAVE_STATE(pl.viewzoom) + SAVE_STATE(pl.weapontime) //TAGGG - NEW VAR - SAVE_STATE(pl.w_attack_akimbo_next); - SAVE_STATE(pl.iZoomLevel); + SAVE_STATE(pl.w_attack_akimbo_next) + SAVE_STATE(pl.iZoomLevel) //SAVE_STATE(pl.flZoomTarget); //TAGGG - also new line. It is a good idea to reset the event diff --git a/src/server/gamerules_multiplayer.qc b/src/server/gamerules_multiplayer.qc index d1a83bc..1973896 100644 --- a/src/server/gamerules_multiplayer.qc +++ b/src/server/gamerules_multiplayer.qc @@ -30,14 +30,19 @@ TSMultiplayerRules::TSMultiplayerRules(void) } - +void CSEv_GamePlayerSpawn(void); bool TSMultiplayerRules::PlayerRequestRespawn(NSClientPlayer bp) { - if (bp.TimeSinceDeath() > 0.5f) { - TSMultiplayerRules rules; - rules = (TSMultiplayerRules)g_grMode; - rules.PlayerMakePlayableWithDefaultMoney(bp); + player pl = (player)bp; + entity oldSelf = self; + + if (pl.iState == 2 || bp.TimeSinceDeath() > 0.5f) { + if(pl.iState == PLAYER_STATE::SPAWNED) { + PlayerRespawn(pl, pl.team); + } else { + PlayerMakePlayableWithDefaultMoney(pl); + } return true; } diff --git a/src/shared/player.h b/src/shared/player.h index f019814..efddda2 100644 --- a/src/shared/player.h +++ b/src/shared/player.h @@ -512,6 +512,7 @@ class player:NSClientPlayer virtual weapondata_basic_t*(void) getEquippedWeaponData; virtual weapondata_basic_t*(void) getEquippedWeaponData_Singular; virtual weapondata_basic_t*(int arg_invID, BOOL arg_preferAkimbo) getInventoryWeaponData; + virtual weapondata_basic_t*(int arg_invID) getInventoryWeaponData_Singular; virtual void(void) updateSlotCountsForEquippedWeapon; virtual BOOL(void) equippedWeaponDeleteCheck; @@ -546,6 +547,7 @@ class player:NSClientPlayer // forget what these are for virtual void(void) frameThink_fromServer; + virtual void(void) ProcessInput; virtual BOOL(CTSWorldGun arg_pickup) attemptAddWeaponFromPickup; virtual void(int arg_weaponID, BOOL completeDrop) dropWeapon; virtual BOOL(void) anyAmmoPoolNonEmpty; diff --git a/src/shared/player.qc b/src/shared/player.qc index ec55123..7051422 100644 --- a/src/shared/player.qc +++ b/src/shared/player.qc @@ -383,75 +383,75 @@ player::PredictPreFrame(void) // client's way of calling prethink preThink(); - SAVE_STATE(anim_top); - SAVE_STATE(anim_top_delay); - SAVE_STATE(anim_top_time); - SAVE_STATE(anim_bottom); - SAVE_STATE(anim_bottom_time); + SAVE_STATE(anim_top) + SAVE_STATE(anim_top_delay) + SAVE_STATE(anim_top_time) + SAVE_STATE(anim_bottom) + SAVE_STATE(anim_bottom_time) - SAVE_STATE(iState); - SAVE_STATE(inventoryEquippedIndex); - SAVE_STATE(weaponEquippedAkimbo); - SAVE_STATE(w_attack_akimbo_next); - SAVE_STATE(isReloading); - SAVE_STATE(isChangingIronsight); + SAVE_STATE(iState) + SAVE_STATE(inventoryEquippedIndex) + SAVE_STATE(weaponEquippedAkimbo) + SAVE_STATE(w_attack_akimbo_next) + SAVE_STATE(isReloading) + SAVE_STATE(isChangingIronsight) //SAVE_STATE(flZoomTarget); - SAVE_STATE(iZoomLevel); - SAVE_STATE(nextAkimboAttackPreference); - SAVE_STATE(akimboDualFireToleranceTime); + SAVE_STATE(iZoomLevel) + SAVE_STATE(nextAkimboAttackPreference) + SAVE_STATE(akimboDualFireToleranceTime) - SAVE_STATE(grenadeFireIndex); - SAVE_STATE(grenadeHeldDuration); - SAVE_STATE(grenadeSpawnTime); - SAVE_STATE(bGrenadeToss); + SAVE_STATE(grenadeFireIndex) + SAVE_STATE(grenadeHeldDuration) + SAVE_STATE(grenadeSpawnTime) + SAVE_STATE(bGrenadeToss) //flKarateBlockCooldown - SAVE_STATE(iMeleeCycler); + SAVE_STATE(iMeleeCycler) - SAVE_STATE(vViewAngleOffsetTargetDir); - SAVE_STATE(vViewAngleOffsetTotalChange); - SAVE_STATE(flViewAngleOffsetTarget); + SAVE_STATE(vViewAngleOffsetTargetDir) + SAVE_STATE(vViewAngleOffsetTotalChange) + SAVE_STATE(flViewAngleOffsetTarget) - SAVE_STATE(fAccuracyKickback); - SAVE_STATE(fAccuracyKickbackStartCooldown); - - SAVE_STATE(fMoveBlockDelay); - SAVE_STATE(fUncrouchBlockDelay); - SAVE_STATE(fKarateStamina); + SAVE_STATE(fAccuracyKickback) + SAVE_STATE(fAccuracyKickbackStartCooldown) + + SAVE_STATE(fMoveBlockDelay) + SAVE_STATE(fUncrouchBlockDelay) + SAVE_STATE(fKarateStamina) - SAVE_STATE(aryNextBurstShotTime_softLength); + SAVE_STATE(aryNextBurstShotTime_softLength) for(i = 0; i < aryNextBurstShotTime_softLength; i++){ SAVE_STATE_ARY(ary_ammoTotal, i); } - SAVE_STATE(aryNextBurstShotTime_listenIndex); + SAVE_STATE(aryNextBurstShotTime_listenIndex) - SAVE_STATE(shotgunReloadIndex); + SAVE_STATE(shotgunReloadIndex) - SAVE_STATE(shotgunAddAmmoTime); - SAVE_STATE(shotgunAddAmmoSoundTime); + SAVE_STATE(shotgunAddAmmoTime) + SAVE_STATE(shotgunAddAmmoSoundTime) - SAVE_STATE(ary_myWeapons_softMax); + SAVE_STATE(ary_myWeapons_softMax) for(i = 0; i < ary_myWeapons_softMax; i++){ - SAVE_STATE(ary_myWeapons[i].weaponID); - SAVE_STATE(ary_myWeapons[i].weaponTypeID); - SAVE_STATE(ary_myWeapons[i].iBitsUpgrade); - SAVE_STATE(ary_myWeapons[i].iCount); + SAVE_STATE(ary_myWeapons[i].weaponID) + SAVE_STATE(ary_myWeapons[i].weaponTypeID) + SAVE_STATE(ary_myWeapons[i].iBitsUpgrade) + SAVE_STATE(ary_myWeapons[i].iCount) //SAVE_STATE(ary_myWeapons[i].iPrice); //SAVE_STATE(ary_myWeapons[i].iSlots); - SAVE_STATE(ary_myWeapons[i].iClipLeft); - SAVE_STATE(ary_myWeapons[i].iClipAkimboLeft); - SAVE_STATE(ary_myWeapons[i].iBitsUpgrade_on); - SAVE_STATE(ary_myWeapons[i].iFireMode); - SAVE_STATE(ary_myWeapons[i].iFireModeAkimbo); - SAVE_STATE(ary_myWeapons[i].iIronSight); - SAVE_STATE(ary_myWeapons[i].iForceBodygroup1Submodel); - SAVE_STATE(ary_myWeapons[i].bNeedsPump); + SAVE_STATE(ary_myWeapons[i].iClipLeft) + SAVE_STATE(ary_myWeapons[i].iClipAkimboLeft) + SAVE_STATE(ary_myWeapons[i].iBitsUpgrade_on) + SAVE_STATE(ary_myWeapons[i].iFireMode) + SAVE_STATE(ary_myWeapons[i].iFireModeAkimbo) + SAVE_STATE(ary_myWeapons[i].iIronSight) + SAVE_STATE(ary_myWeapons[i].iForceBodygroup1Submodel) + SAVE_STATE(ary_myWeapons[i].bNeedsPump) } //UNNECESSARY. This array is of fixed length, so known at all times. @@ -495,77 +495,77 @@ player::PredictPostFrame(void) // client's way of calling postthink postThink(); - ROLL_BACK(anim_top); - ROLL_BACK(anim_top_delay); - ROLL_BACK(anim_top_time); - ROLL_BACK(anim_bottom); - ROLL_BACK(anim_bottom_time); + ROLL_BACK(anim_top) + ROLL_BACK(anim_top_delay) + ROLL_BACK(anim_top_time) + ROLL_BACK(anim_bottom) + ROLL_BACK(anim_bottom_time) - ROLL_BACK(iState); - ROLL_BACK(inventoryEquippedIndex); - ROLL_BACK(weaponEquippedAkimbo); - ROLL_BACK(w_attack_akimbo_next); - ROLL_BACK(isReloading); - ROLL_BACK(isChangingIronsight); + ROLL_BACK(iState) + ROLL_BACK(inventoryEquippedIndex) + ROLL_BACK(weaponEquippedAkimbo) + ROLL_BACK(w_attack_akimbo_next) + ROLL_BACK(isReloading) + ROLL_BACK(isChangingIronsight) //ROLL_BACK(flZoomTarget); - ROLL_BACK(iZoomLevel); + ROLL_BACK(iZoomLevel) - ROLL_BACK(nextAkimboAttackPreference); - ROLL_BACK(akimboDualFireToleranceTime); + ROLL_BACK(nextAkimboAttackPreference) + ROLL_BACK(akimboDualFireToleranceTime) - ROLL_BACK(grenadeFireIndex); - ROLL_BACK(grenadeHeldDuration); - ROLL_BACK(grenadeSpawnTime); - ROLL_BACK(bGrenadeToss); + ROLL_BACK(grenadeFireIndex) + ROLL_BACK(grenadeHeldDuration) + ROLL_BACK(grenadeSpawnTime) + ROLL_BACK(bGrenadeToss) //flKarateBlockCooldown - ROLL_BACK(iMeleeCycler); + ROLL_BACK(iMeleeCycler) - ROLL_BACK(vViewAngleOffsetTargetDir); - ROLL_BACK(vViewAngleOffsetTotalChange); - ROLL_BACK(flViewAngleOffsetTarget); + ROLL_BACK(vViewAngleOffsetTargetDir) + ROLL_BACK(vViewAngleOffsetTotalChange) + ROLL_BACK(flViewAngleOffsetTarget) - ROLL_BACK(fAccuracyKickback); - ROLL_BACK(fAccuracyKickbackStartCooldown); + ROLL_BACK(fAccuracyKickback) + ROLL_BACK(fAccuracyKickbackStartCooldown) - ROLL_BACK(fMoveBlockDelay); - ROLL_BACK(fUncrouchBlockDelay); - ROLL_BACK(fKarateStamina); + ROLL_BACK(fMoveBlockDelay) + ROLL_BACK(fUncrouchBlockDelay) + ROLL_BACK(fKarateStamina) - ROLL_BACK(aryNextBurstShotTime_softLength); + ROLL_BACK(aryNextBurstShotTime_softLength) for(i = 0; i < aryNextBurstShotTime_softLength; i++){ ROLL_BACK_ARY(ary_ammoTotal, i); } - ROLL_BACK(aryNextBurstShotTime_listenIndex); + ROLL_BACK(aryNextBurstShotTime_listenIndex) - ROLL_BACK(shotgunReloadIndex); - ROLL_BACK(shotgunAddAmmoTime); - ROLL_BACK(shotgunAddAmmoSoundTime); + ROLL_BACK(shotgunReloadIndex) + ROLL_BACK(shotgunAddAmmoTime) + ROLL_BACK(shotgunAddAmmoSoundTime) - ROLL_BACK(ary_myWeapons_softMax); + ROLL_BACK(ary_myWeapons_softMax) for(i = 0; i < ary_myWeapons_softMax; i++){ - ROLL_BACK(ary_myWeapons[i].weaponID); - ROLL_BACK(ary_myWeapons[i].weaponTypeID); - ROLL_BACK(ary_myWeapons[i].iBitsUpgrade); - ROLL_BACK(ary_myWeapons[i].iCount); - //ROLL_BACK(ary_myWeapons[i].iPrice); - //ROLL_BACK(ary_myWeapons[i].iSlots); - ROLL_BACK(ary_myWeapons[i].iClipLeft); - ROLL_BACK(ary_myWeapons[i].iClipAkimboLeft); - ROLL_BACK(ary_myWeapons[i].iBitsUpgrade_on); - ROLL_BACK(ary_myWeapons[i].iFireMode); - ROLL_BACK(ary_myWeapons[i].iFireModeAkimbo); - ROLL_BACK(ary_myWeapons[i].iIronSight); - ROLL_BACK(ary_myWeapons[i].iForceBodygroup1Submodel); - ROLL_BACK(ary_myWeapons[i].bNeedsPump); + ROLL_BACK(ary_myWeapons[i].weaponID) + ROLL_BACK(ary_myWeapons[i].weaponTypeID) + ROLL_BACK(ary_myWeapons[i].iBitsUpgrade) + ROLL_BACK(ary_myWeapons[i].iCount) + //ROLL_BACK(ary_myWeapons[i].iPrice) + //ROLL_BACK(ary_myWeapons[i].iSlots) + ROLL_BACK(ary_myWeapons[i].iClipLeft) + ROLL_BACK(ary_myWeapons[i].iClipAkimboLeft) + ROLL_BACK(ary_myWeapons[i].iBitsUpgrade_on) + ROLL_BACK(ary_myWeapons[i].iFireMode) + ROLL_BACK(ary_myWeapons[i].iFireModeAkimbo) + ROLL_BACK(ary_myWeapons[i].iIronSight) + ROLL_BACK(ary_myWeapons[i].iForceBodygroup1Submodel) + ROLL_BACK(ary_myWeapons[i].bNeedsPump) } // UNNECESSARY. This array is of fixed length, so known at all times. @@ -606,7 +606,7 @@ player::EvaluateEntity(void) // set some flag to convey that? - SAVE_STATE(ary_myWeapons_softMax); + SAVE_STATE(ary_myWeapons_softMax) i = inventoryEquippedIndex; @@ -654,78 +654,78 @@ player::EvaluateEntity(void) } - SAVE_STATE(anim_top); - SAVE_STATE(anim_top_delay); - SAVE_STATE(anim_top_time); - SAVE_STATE(anim_bottom); - SAVE_STATE(anim_bottom_time); + SAVE_STATE(anim_top) + SAVE_STATE(anim_top_delay) + SAVE_STATE(anim_top_time) + SAVE_STATE(anim_bottom) + SAVE_STATE(anim_bottom_time) - SAVE_STATE(iState); - SAVE_STATE(inventoryEquippedIndex); - SAVE_STATE(weaponEquippedAkimbo); - SAVE_STATE(w_attack_akimbo_next); - SAVE_STATE(isReloading); - SAVE_STATE(isChangingIronsight); - //SAVE_STATE(flZoomTarget); - SAVE_STATE(iZoomLevel); - SAVE_STATE(nextAkimboAttackPreference); - SAVE_STATE(akimboDualFireToleranceTime); + SAVE_STATE(iState) + SAVE_STATE(inventoryEquippedIndex) + SAVE_STATE(weaponEquippedAkimbo) + SAVE_STATE(w_attack_akimbo_next) + SAVE_STATE(isReloading) + SAVE_STATE(isChangingIronsight) + //SAVE_STATE(flZoomTarget) + SAVE_STATE(iZoomLevel) + SAVE_STATE(nextAkimboAttackPreference) + SAVE_STATE(akimboDualFireToleranceTime) - SAVE_STATE(grenadeFireIndex); - SAVE_STATE(grenadeHeldDuration); - SAVE_STATE(grenadeSpawnTime); - SAVE_STATE(bGrenadeToss); + SAVE_STATE(grenadeFireIndex) + SAVE_STATE(grenadeHeldDuration) + SAVE_STATE(grenadeSpawnTime) + SAVE_STATE(bGrenadeToss) //flKarateBlockCooldown - SAVE_STATE(iMeleeCycler); + SAVE_STATE(iMeleeCycler) - SAVE_STATE(vViewAngleOffsetTargetDir); - SAVE_STATE(vViewAngleOffsetTotalChange); - SAVE_STATE(flViewAngleOffsetTarget); + SAVE_STATE(vViewAngleOffsetTargetDir) + SAVE_STATE(vViewAngleOffsetTotalChange) + SAVE_STATE(flViewAngleOffsetTarget) - SAVE_STATE(fAccuracyKickback); - SAVE_STATE(fAccuracyKickbackStartCooldown); + SAVE_STATE(fAccuracyKickback) + SAVE_STATE(fAccuracyKickbackStartCooldown) - SAVE_STATE(fMoveBlockDelay); - SAVE_STATE(fUncrouchBlockDelay); - SAVE_STATE(fKarateStamina); + SAVE_STATE(fMoveBlockDelay) + SAVE_STATE(fUncrouchBlockDelay) + SAVE_STATE(fKarateStamina) - SAVE_STATE(aryNextBurstShotTime_softLength); + SAVE_STATE(aryNextBurstShotTime_softLength) for(i = 0; i < aryNextBurstShotTime_softLength; i++){ SAVE_STATE_ARY(ary_ammoTotal, i); } - SAVE_STATE(aryNextBurstShotTime_listenIndex); + SAVE_STATE(aryNextBurstShotTime_listenIndex) - SAVE_STATE(shotgunReloadIndex); + SAVE_STATE(shotgunReloadIndex) - SAVE_STATE(shotgunAddAmmoTime); - SAVE_STATE(shotgunAddAmmoSoundTime); + SAVE_STATE(shotgunAddAmmoTime) + SAVE_STATE(shotgunAddAmmoSoundTime) - SAVE_STATE(ary_myWeapons_softMax); + SAVE_STATE(ary_myWeapons_softMax) i = inventoryEquippedIndex; if(i != -1){ //for(i = 0; i < ary_myWeapons_softMax; i++){ - SAVE_STATE(ary_myWeapons[i].weaponID); - SAVE_STATE(ary_myWeapons[i].weaponTypeID); - SAVE_STATE(ary_myWeapons[i].iBitsUpgrade); - SAVE_STATE(ary_myWeapons[i].iCount); - //SAVE_STATE(ary_myWeapons[i].iPrice); - //SAVE_STATE(ary_myWeapons[i].iSlots); - SAVE_STATE(ary_myWeapons[i].iClipLeft); - SAVE_STATE(ary_myWeapons[i].iClipAkimboLeft); - SAVE_STATE(ary_myWeapons[i].iBitsUpgrade_on); - SAVE_STATE(ary_myWeapons[i].iFireMode); - SAVE_STATE(ary_myWeapons[i].iFireModeAkimbo); - SAVE_STATE(ary_myWeapons[i].iIronSight); - SAVE_STATE(ary_myWeapons[i].iForceBodygroup1Submodel); - SAVE_STATE(ary_myWeapons[i].bNeedsPump); + SAVE_STATE(ary_myWeapons[i].weaponID) + SAVE_STATE(ary_myWeapons[i].weaponTypeID) + SAVE_STATE(ary_myWeapons[i].iBitsUpgrade) + SAVE_STATE(ary_myWeapons[i].iCount) + //SAVE_STATE(ary_myWeapons[i].iPrice) + //SAVE_STATE(ary_myWeapons[i].iSlots) + SAVE_STATE(ary_myWeapons[i].iClipLeft) + SAVE_STATE(ary_myWeapons[i].iClipAkimboLeft) + SAVE_STATE(ary_myWeapons[i].iBitsUpgrade_on) + SAVE_STATE(ary_myWeapons[i].iFireMode) + SAVE_STATE(ary_myWeapons[i].iFireModeAkimbo) + SAVE_STATE(ary_myWeapons[i].iIronSight) + SAVE_STATE(ary_myWeapons[i].iForceBodygroup1Submodel) + SAVE_STATE(ary_myWeapons[i].bNeedsPump) //} @@ -1550,9 +1550,9 @@ player::setInventoryEquippedIndex_Akimbo(int arg_newIndex, BOOL useAkimbo) // Force a sendoff! SendFlags |= PLAYER_WEAPON; #else - SAVE_STATE(activeweapon); + SAVE_STATE(activeweapon) // unsure if this one's needed - SAVE_STATE(inventoryEquippedIndex); + SAVE_STATE(inventoryEquippedIndex) #endif @@ -2203,6 +2203,22 @@ player::dropAmmo(void){ }// dropAmmo +void +player::ProcessInput(void) +{ + /* HACK: ugly workaround for some thing I cba to fix right now */ + if(iState == 2){ + if (input_buttons & 1) { + CGameRules rules = (CGameRules)g_grMode; + rules.PlayerRequestRespawn(this); + return; + } + } + + super::ProcessInput(); +} + + #endif diff --git a/src/shared/util.qc b/src/shared/util.qc index f25c476..86f9fa6 100644 --- a/src/shared/util.qc +++ b/src/shared/util.qc @@ -406,7 +406,7 @@ TS_View_PlayAnimation(player pl, int iSequence, float fDuration){ pSeat->m_eViewModel.frame = (float)iSequence; pl.weapontime = 0.0f; pl.weaponframe = iSequence; - SAVE_STATE(pl.weapontime); + SAVE_STATE(pl.weapontime) //pSeat->m_eViewModel.frame2time = 0; //pSeat->m_eViewModel.frame1time = 0; @@ -422,7 +422,7 @@ TS_View_PlayAnimation_noLaserLock(player pl, int iSequence, float fDuration){ pSeat->m_eViewModel.frame = (float)iSequence; pl.weapontime = 0.0f; pl.weaponframe = iSequence; - SAVE_STATE(pl.weapontime); + SAVE_STATE(pl.weapontime) pl.w_freeze_idle_next = -1; //assume this? pl.lasersightUnlockTime = TRUE; @@ -434,7 +434,7 @@ TS_View_PlayAnimation_EndIdle(player pl, int iSequence, float fDuration){ pSeat->m_eViewModel.frame = (float)iSequence; pl.weapontime = 0.0f; pl.weaponframe = iSequence; - SAVE_STATE(pl.weapontime); + SAVE_STATE(pl.weapontime) // ?? Do we want to do this or not then pl.lasersightUnlockTime = FALSE; //reset @@ -448,7 +448,7 @@ TS_View_PlayAnimation_EndIdle_custom(player pl, int iSequence, float fDuration, pSeat->m_eViewModel.frame = (float)iSequence; pl.weapontime = 0.0f; pl.weaponframe = iSequence; - SAVE_STATE(pl.weapontime); + SAVE_STATE(pl.weapontime) pl.lasersightUnlockTime = FALSE; //reset pl.w_freeze_idle_next = fDuration + fIdleEndOffset + getViewModelAnimExtraDuration();