Work around some quirks.

This commit is contained in:
Marco Cawthorne 2024-02-19 13:50:19 -08:00
parent 93b4b445a6
commit c2f37acf7e
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
3 changed files with 15 additions and 5 deletions

View File

@ -27,7 +27,8 @@ void UI_MOTD_btnOK_Clicked( void ){
if(!g_UI_MOTD_everClosed){
UI_ChangeScreen(UI_SCREEN::BUYMENU);
}else{
UI_ChangeScreen(UI_SCREEN::NONE);
//UI_ChangeScreen(UI_SCREEN::NONE);
UI_MOTD_win.Hide();
}
}

View File

@ -37,7 +37,7 @@ TSMultiplayerRules::PlayerRequestRespawn(NSClientPlayer bp)
player pl = (player)bp;
entity oldSelf = self;
if (pl.iState == 2 || bp.TimeSinceDeath() > 0.5f) {
if (bp.TimeSinceDeath() > 0.5f) {
if(pl.iState == PLAYER_STATE::SPAWNED) {
PlayerRespawn(pl, pl.team);
} else {

View File

@ -2206,10 +2206,19 @@ player::dropAmmo(void){
void
player::ProcessInput(void)
{
/* HACK: ugly workaround for some thing I cba to fix right now */
if(iState == 2){
if (input_buttons & 1) {
/* have we not spawned yet? */
if(iState != PLAYER_STATE::SPAWNED) {
/* fire = respawn */
if (input_buttons & INPUT_BUTTON0) {
CGameRules rules = (CGameRules)g_grMode;
/* want to spawn the first time, make us 'dead' so we can respawn */
if (m_flDeathTime == 0.0) {
health = 0.0f;
m_flDeathTime = time;
}
/* same as normal */
rules.PlayerRequestRespawn(this);
return;
}