mirror of
https://github.com/UberGames/RPG-X2.git
synced 2024-11-21 20:11:21 +00:00
Added entity fields startRGBA and endRGBA, minor bugfixes
This commit is contained in:
parent
12851350a9
commit
18b101c4b6
4 changed files with 16 additions and 3 deletions
|
@ -139,7 +139,7 @@ void steam_think( gentity_t *ent )
|
|||
|
||||
// FIXME: This may be a bit weird for steam bursts*/
|
||||
// If a fool gets in the bolt path, zap 'em
|
||||
if ( ent->damage || )
|
||||
if ( ent->damage )
|
||||
{
|
||||
vec3_t start, temp;
|
||||
trace_t trace;
|
||||
|
@ -172,12 +172,12 @@ void steam_use( gentity_t *self, gentity_t *other, gentity_t *activator )
|
|||
return;
|
||||
if ( self->count )
|
||||
{
|
||||
ent->think = 0;
|
||||
self->think = 0;
|
||||
self->nextthink = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ent->think = steam_think;
|
||||
self->think = steam_think;
|
||||
self->nextthink = level.time + 100;
|
||||
}
|
||||
|
||||
|
|
|
@ -386,6 +386,8 @@ struct gentity_s {
|
|||
char *luaParm4;
|
||||
qboolean luaEntity;
|
||||
#endif
|
||||
vec4_t startRGBA;
|
||||
vec4_t endRGBA;
|
||||
};
|
||||
|
||||
/** \enum clientConnected_t
|
||||
|
|
|
@ -63,6 +63,8 @@ field_t fields[] = {
|
|||
{"luaParm4", FOFS(luaParm4), F_LSTRING},
|
||||
{"luaEntity", FOFS(luaEntity), F_INT},
|
||||
#endif
|
||||
{"startRGBA", FOFS(startRGBA), F_VECTOR4},
|
||||
{"endRGBA", FOFS(endRGBA), F_VECTOR4},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
|
@ -550,6 +552,7 @@ qboolean G_ParseField( const char *key, const char *value, gentity_t *ent ) {
|
|||
byte *b;
|
||||
float v;
|
||||
vec3_t vec;
|
||||
vec4_t vec4;
|
||||
int i;
|
||||
|
||||
for ( f=fields ; f->name ; f++ ) {
|
||||
|
@ -567,6 +570,13 @@ qboolean G_ParseField( const char *key, const char *value, gentity_t *ent ) {
|
|||
((float *)(b+f->ofs))[1] = vec[1];
|
||||
((float *)(b+f->ofs))[2] = vec[2];
|
||||
break;
|
||||
case F_VECTOR4:
|
||||
i = sscanf (value, "%f %f %f %f", &vec4[0], &vec[1], &vec[2], &vec[3]);
|
||||
((float *)(b+f->ofs))[0] = vec[0];
|
||||
((float *)(b+f->ofs))[0] = vec[1];
|
||||
((float *)(b+f->ofs))[0] = vec[2];
|
||||
((float *)(b+f->ofs))[0] = vec[3];
|
||||
break;
|
||||
case F_INT:
|
||||
*(int *)(b+f->ofs) = atoi(value);
|
||||
break;
|
||||
|
|
|
@ -7,6 +7,7 @@ typedef enum {
|
|||
F_LSTRING, // string on disk, pointer in memory, TAG_LEVEL
|
||||
F_GSTRING, // string on disk, pointer in memory, TAG_GAME
|
||||
F_VECTOR,
|
||||
F_VECTOR4,
|
||||
F_ANGLEHACK,
|
||||
F_ENTITY, // index on disk, pointer in memory
|
||||
F_ITEM, // index on disk, pointer in memory
|
||||
|
|
Loading…
Reference in a new issue