mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-10 06:42:21 +00:00
Investigated PVS report for player and shared and addressed the issues
This commit is contained in:
parent
c2188ed5f6
commit
0e177c90ea
4 changed files with 9 additions and 18 deletions
|
@ -755,7 +755,6 @@ void cleanupHealTarget(edict_t *ent);
|
||||||
#define DEFAULT_BULLET_VSPREAD 500
|
#define DEFAULT_BULLET_VSPREAD 500
|
||||||
#define DEFAULT_SHOTGUN_HSPREAD 1000
|
#define DEFAULT_SHOTGUN_HSPREAD 1000
|
||||||
#define DEFAULT_SHOTGUN_VSPREAD 500
|
#define DEFAULT_SHOTGUN_VSPREAD 500
|
||||||
#define DEFAULT_DEATHMATCH_SHOTGUN_COUNT 12
|
|
||||||
#define DEFAULT_SHOTGUN_COUNT 12
|
#define DEFAULT_SHOTGUN_COUNT 12
|
||||||
#define DEFAULT_SSHOTGUN_COUNT 20
|
#define DEFAULT_SSHOTGUN_COUNT 20
|
||||||
|
|
||||||
|
|
|
@ -325,7 +325,7 @@ ClientObituary(edict_t *self, edict_t *inflictor /* unused */, edict_t *attacker
|
||||||
|
|
||||||
self->enemy = attacker;
|
self->enemy = attacker;
|
||||||
|
|
||||||
if (attacker && attacker->client)
|
if (attacker->client)
|
||||||
{
|
{
|
||||||
switch (mod)
|
switch (mod)
|
||||||
{
|
{
|
||||||
|
@ -589,7 +589,7 @@ LookAtKiller(edict_t *self, edict_t *inflictor, edict_t *attacker)
|
||||||
{
|
{
|
||||||
vec3_t dir;
|
vec3_t dir;
|
||||||
|
|
||||||
if (!self || !inflictor || !attacker)
|
if (!self)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -833,7 +833,6 @@ InitClientPersistant(gclient_t *client)
|
||||||
client->pers.max_prox = 50;
|
client->pers.max_prox = 50;
|
||||||
client->pers.max_tesla = 50;
|
client->pers.max_tesla = 50;
|
||||||
client->pers.max_flechettes = 200;
|
client->pers.max_flechettes = 200;
|
||||||
client->pers.max_flechettes = 200;
|
|
||||||
client->pers.max_rounds = 100;
|
client->pers.max_rounds = 100;
|
||||||
|
|
||||||
client->pers.connected = true;
|
client->pers.connected = true;
|
||||||
|
|
|
@ -537,7 +537,7 @@ Weapon_Generic(edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST, int F
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (!ent || !pause_frames || !fire)
|
if (!ent || !fire)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1711,16 +1711,8 @@ weapon_shotgun_fire(edict_t *ent)
|
||||||
kick *= damage_multiplier;
|
kick *= damage_multiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deathmatch->value)
|
fire_shotgun(ent, start, forward, damage, kick, 500, 500,
|
||||||
{
|
DEFAULT_SHOTGUN_COUNT, MOD_SHOTGUN);
|
||||||
fire_shotgun(ent, start, forward, damage, kick, 500, 500,
|
|
||||||
DEFAULT_DEATHMATCH_SHOTGUN_COUNT, MOD_SHOTGUN);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fire_shotgun(ent, start, forward, damage, kick, 500, 500,
|
|
||||||
DEFAULT_SHOTGUN_COUNT, MOD_SHOTGUN);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* send muzzle flash */
|
/* send muzzle flash */
|
||||||
gi.WriteByte(svc_muzzleflash);
|
gi.WriteByte(svc_muzzleflash);
|
||||||
|
|
|
@ -57,7 +57,7 @@ RotatePointAroundVector(vec3_t dst, const vec3_t dir,
|
||||||
im[2][1] = m[1][2];
|
im[2][1] = m[1][2];
|
||||||
|
|
||||||
memset(zrot, 0, sizeof(zrot));
|
memset(zrot, 0, sizeof(zrot));
|
||||||
zrot[0][0] = zrot[1][1] = zrot[2][2] = 1.0F;
|
zrot[1][1] = zrot[2][2] = 1.0F;
|
||||||
|
|
||||||
zrot[0][0] = (float)cos(DEG2RAD(degrees));
|
zrot[0][0] = (float)cos(DEG2RAD(degrees));
|
||||||
zrot[0][1] = (float)sin(DEG2RAD(degrees));
|
zrot[0][1] = (float)sin(DEG2RAD(degrees));
|
||||||
|
@ -851,6 +851,7 @@ Swap_Init(void)
|
||||||
byte swaptest[2] = {1, 0};
|
byte swaptest[2] = {1, 0};
|
||||||
|
|
||||||
/* set the byte swapping variables in a portable manner */
|
/* set the byte swapping variables in a portable manner */
|
||||||
|
/* PVS NOTE: maybe use memcpy instead? */
|
||||||
if (*(short *)swaptest == 1)
|
if (*(short *)swaptest == 1)
|
||||||
{
|
{
|
||||||
bigendien = false;
|
bigendien = false;
|
||||||
|
@ -1072,7 +1073,7 @@ Com_sprintf(char *dest, int size, char *fmt, ...)
|
||||||
len = vsnprintf(bigbuffer, 0x10000, fmt, argptr);
|
len = vsnprintf(bigbuffer, 0x10000, fmt, argptr);
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
|
|
||||||
if ((len >= size) || (len == size))
|
if (len >= size)
|
||||||
{
|
{
|
||||||
Com_Printf("Com_sprintf: overflow\n");
|
Com_Printf("Com_sprintf: overflow\n");
|
||||||
|
|
||||||
|
@ -1325,7 +1326,7 @@ Info_SetValueForKey(char *s, char *key, char *value)
|
||||||
|
|
||||||
Info_RemoveKey(s, key);
|
Info_RemoveKey(s, key);
|
||||||
|
|
||||||
if (!value || !strlen(value))
|
if (*value == '\0')
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue