r1q2-gamefixup, erster teil

This commit is contained in:
Yamagi Burmeister 2009-03-09 14:33:49 +00:00
parent 3633fbd922
commit 98da72c23e
5 changed files with 16 additions and 13 deletions

View file

@ -180,6 +180,8 @@ static int CheckPowerArmor (edict_t *ent, vec3_t point, vec3_t normal, int damag
if (!damage)
return 0;
index = 0;
client = ent->client;
if (dflags & DAMAGE_NO_ARMOR)
@ -205,6 +207,7 @@ static int CheckPowerArmor (edict_t *ent, vec3_t point, vec3_t normal, int damag
if (power_armor_type == POWER_ARMOR_NONE)
return 0;
if (!power)
return 0;

View file

@ -40,9 +40,9 @@ gitem_armor_t jacketarmor_info = { 25, 50, .30, .00, ARMOR_JACKET};
gitem_armor_t combatarmor_info = { 50, 100, .60, .30, ARMOR_COMBAT};
gitem_armor_t bodyarmor_info = {100, 200, .80, .60, ARMOR_BODY};
static int jacket_armor_index;
static int combat_armor_index;
static int body_armor_index;
int jacket_armor_index;
int combat_armor_index;
int body_armor_index;
static int power_screen_index;
static int power_shield_index;

View file

@ -464,7 +464,7 @@ A single player death will automatically restore from the
last save position.
============
*/
void WriteGame (char *filename, qboolean autosave)
void WriteGame (const char *filename, qboolean autosave)
{
FILE *f;
int i;
@ -491,7 +491,7 @@ void WriteGame (char *filename, qboolean autosave)
fclose (f);
}
void ReadGame (char *filename)
void ReadGame (const char *filename)
{
FILE *f;
int i;
@ -632,7 +632,7 @@ WriteLevel
=================
*/
void WriteLevel (char *filename)
void WriteLevel (const char *filename)
{
int i;
edict_t *ent;
@ -686,7 +686,7 @@ calling ReadLevel.
No clients are connected yet.
=================
*/
void ReadLevel (char *filename)
void ReadLevel (const char *filename)
{
int entnum;
FILE *f;

View file

@ -316,7 +316,7 @@ void ED_CallSpawn (edict_t *ent)
ED_NewString
=============
*/
char *ED_NewString (char *string)
char *ED_NewString (const char *string)
{
char *newb, *new_p;
int i,l;
@ -352,7 +352,7 @@ Takes a key/value pair and sets the binary values
in an edict
===============
*/
void ED_ParseField (char *key, char *value, edict_t *ent)
void ED_ParseField (const char *key, const char *value, edict_t *ent)
{
field_t *f;
byte *b;
@ -414,7 +414,7 @@ char *ED_ParseEdict (char *data, edict_t *ent)
{
qboolean init;
char keyname[256];
char *com_token;
const char *com_token;
init = false;
memset (&st, 0, sizeof(st));
@ -516,11 +516,11 @@ Creates a server's entity / program execution context by
parsing textual entity definitions out of an ent file.
==============
*/
void SpawnEntities (char *mapname, char *entities, char *spawnpoint)
void SpawnEntities (const char *mapname, char *entities, const char *spawnpoint)
{
edict_t *ent;
int inhibit;
char *com_token;
const char *com_token;
int i;
float skill_level;

View file

@ -1169,7 +1169,7 @@ void PutClientInServer (edict_t *ent)
ent->waterlevel = 0;
ent->watertype = 0;
ent->flags &= ~FL_NO_KNOCKBACK;
ent->svflags &= 0;
ent->svflags = 0;
VectorCopy (mins, ent->mins);
VectorCopy (maxs, ent->maxs);