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

View file

@ -16,3 +16,5 @@
#include "gamerules.h" #include "gamerules.h"
#include "../../../valve/src/server/items.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/server.src
../../../src/gs-entbase/shared.src ../../../src/gs-entbase/shared.src
../shared/include.src
defs.h defs.h
../shared/include.src
../../../valve/src/server/monster_scientist_dead.qc ../../../valve/src/server/monster_scientist_dead.qc
../../../valve/src/server/player.qc ../../../valve/src/server/player.qc
@ -43,8 +44,6 @@ server.qc
../../../valve/src/server/flashlight.qc ../../../valve/src/server/flashlight.qc
../../../base/src/server/modelevent.qc ../../../base/src/server/modelevent.qc
input.qc
../../../valve/src/server/spawn.qc ../../../valve/src/server/spawn.qc
../../../src/server/include.src ../../../src/server/include.src

View file

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

View file

@ -23,6 +23,7 @@ Handles impulse and whatnot
*/ */
void Game_Input(void) void Game_Input(void)
{ {
#ifdef SERVER
CGameRules rules = (CGameRules)g_grMode; CGameRules rules = (CGameRules)g_grMode;
if (rules.m_iIntermission) { if (rules.m_iIntermission) {
@ -30,16 +31,6 @@ void Game_Input(void)
return; 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) { if (input_buttons & INPUT_BUTTON5) {
Player_UseDown(); Player_UseDown();
} else { } else {
@ -49,9 +40,6 @@ void Game_Input(void)
if (self.impulse == 100) { if (self.impulse == 100) {
Flashlight_Toggle(); Flashlight_Toggle();
} }
if (self.impulse == 240)
Bot_AddQuick();
/* Uncomment rune weapons if you desire */ /* Uncomment rune weapons if you desire */
if (cvar("sv_cheats") == 1) { if (cvar("sv_cheats") == 1) {
@ -74,4 +62,15 @@ void Game_Input(void)
} }
self.impulse = 0; 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();
}
} }