mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-23 04:52:07 +00:00
Merge pull request #747 from De-Seppe/master
Feature request : add cvar to disable machine gun recoil in single player #741 (baseq2)
This commit is contained in:
commit
bd90450ba7
5 changed files with 11 additions and 2 deletions
|
@ -49,6 +49,12 @@ it's `+set busywait 0` (setting the `busywait` cvar) and `-portable`
|
|||
slightly inaccurate, bullets and the like have a little drift. When
|
||||
set to `1` they hit exactly were the crosshair is.
|
||||
|
||||
* **g_machinegun_norecoil**: Disable machine gun recoil in single player.
|
||||
By default this is set to `0`, this keeps the original machine gun
|
||||
recoil in single player. When set to `1` the recoil is disabled in
|
||||
single player, the same way as in multiplayer.
|
||||
This cvar only works if the game.dll implements this behaviour.
|
||||
|
||||
* **busywait**: By default this is set to `1`, causing Quake II to spin
|
||||
in a very tight loop until it's time to process the next frame. This
|
||||
is a very accurate way to determine the internal timing, but comes with
|
||||
|
|
|
@ -86,6 +86,7 @@ cvar_t *sv_maplist;
|
|||
cvar_t *gib_on;
|
||||
|
||||
cvar_t *aimfix;
|
||||
cvar_t *g_machinegun_norecoil;
|
||||
|
||||
void SpawnEntities(char *mapname, char *entities, char *spawnpoint);
|
||||
void ClientThink(edict_t *ent, usercmd_t *cmd);
|
||||
|
|
|
@ -549,6 +549,7 @@ extern cvar_t *flood_waitdelay;
|
|||
extern cvar_t *sv_maplist;
|
||||
|
||||
extern cvar_t *aimfix;
|
||||
extern cvar_t *g_machinegun_norecoil;
|
||||
|
||||
#define world (&g_edicts[0])
|
||||
|
||||
|
|
|
@ -1249,7 +1249,7 @@ Machinegun_Fire(edict_t *ent)
|
|||
ent->client->kick_angles[0] = ent->client->machinegun_shots * -1.5;
|
||||
|
||||
/* raise the gun as it is firing */
|
||||
if (!deathmatch->value)
|
||||
if (!(deathmatch->value || g_machinegun_norecoil->value))
|
||||
{
|
||||
ent->client->machinegun_shots++;
|
||||
|
||||
|
|
|
@ -273,6 +273,7 @@ InitGame(void)
|
|||
|
||||
/* others */
|
||||
aimfix = gi.cvar("aimfix", "0", CVAR_ARCHIVE);
|
||||
g_machinegun_norecoil = gi.cvar("g_machinegun_norecoil", "0", CVAR_ARCHIVE);
|
||||
|
||||
/* items */
|
||||
InitItems();
|
||||
|
|
Loading…
Reference in a new issue