Merge client/input.qc and server/input.qc into shared/input.qc

This commit is contained in:
Marco Cawthorne 2021-03-09 12:13:51 +01:00
parent 4db204411d
commit 653405e507
5 changed files with 17 additions and 18 deletions

View file

@ -20,7 +20,6 @@
../../../src/gs-entbase/shared.src
../shared/include.src
../../../valve/src/client/predict.qc
init.qc
../../../valve/src/client/player.qc
entities.qc
@ -31,7 +30,6 @@ obituary.qc
hud.qc
../../../valve/src/client/hud_weaponselect.qc
../../../valve/src/client/scoreboard.qc
../../../valve/src/client/input.qc
../../../base/src/client/modelevent.qc
../../../src/client/include.src

View file

@ -16,3 +16,5 @@
#include "gamerules.h"
#include "../../../valve/src/server/items.h"
#include "../../../valve/src/server/flashlight.h"
#include "../../../valve/src/server/player.h"

View file

@ -15,10 +15,11 @@
../../../src/gs-entbase/server.src
../../../src/gs-entbase/shared.src
../shared/include.src
defs.h
../shared/include.src
../../../valve/src/server/monster_scientist_dead.qc
../../../valve/src/server/player.qc
@ -43,8 +44,6 @@ server.qc
../../../valve/src/server/flashlight.qc
../../../base/src/server/modelevent.qc
input.qc
../../../valve/src/server/spawn.qc
../../../src/server/include.src

View file

@ -33,4 +33,5 @@ w_machette.qc
w_sodalauncher.qc
weapons.qc
../../../valve/src/shared/weapon_common.qc
input.qc
#endlist

View file

@ -23,6 +23,7 @@ Handles impulse and whatnot
*/
void Game_Input(void)
{
#ifdef SERVER
CGameRules rules = (CGameRules)g_grMode;
if (rules.m_iIntermission) {
@ -30,16 +31,6 @@ void Game_Input(void)
return;
}
if (input_buttons & INPUT_BUTTON0) {
Weapons_Primary();
} else if (input_buttons & INPUT_BUTTON4) {
Weapons_Reload();
} else if (input_buttons & INPUT_BUTTON3) {
Weapons_Secondary();
} else {
Weapons_Release();
}
if (input_buttons & INPUT_BUTTON5) {
Player_UseDown();
} else {
@ -50,9 +41,6 @@ void Game_Input(void)
Flashlight_Toggle();
}
if (self.impulse == 240)
Bot_AddQuick();
/* Uncomment rune weapons if you desire */
if (cvar("sv_cheats") == 1) {
player pl = (player)self;
@ -74,4 +62,15 @@ void Game_Input(void)
}
self.impulse = 0;
#endif
if (input_buttons & INPUT_BUTTON0) {
Weapons_Primary();
} else if (input_buttons & INPUT_BUTTON4) {
Weapons_Reload();
} else if (input_buttons & INPUT_BUTTON3) {
Weapons_Secondary();
} else {
Weapons_Release();
}
}