mirror of
https://git.code.sf.net/p/quake/game-source
synced 2024-11-22 12:01:26 +00:00
Sanity improvements. It's not enough, yet, though...
This commit is contained in:
parent
f63eb36504
commit
c9150ef436
2 changed files with 61 additions and 52 deletions
|
@ -32,9 +32,8 @@ void() item_remove_regen = {
|
|||
void() item_generic_touch = {
|
||||
if (!other.th_takeitem)
|
||||
return;
|
||||
|
||||
if (!util_check_targets()) return;
|
||||
|
||||
if (!util_check_targets ())
|
||||
return;
|
||||
if (!switcheroo (other, self, other.th_takeitem))
|
||||
return;
|
||||
|
||||
|
|
|
@ -10,21 +10,30 @@ void() util_map_entity_init = {
|
|||
self.deadflag = DEAD_NONLIVING;
|
||||
|
||||
if (self.noise && sv_spawning) {
|
||||
if (!self.volume) self.volume = 0.5;
|
||||
if (!self.attenuation) self.attenuation = ATTN_STATIC;
|
||||
if (!self.volume)
|
||||
self.volume = 0.5;
|
||||
if (!self.attenuation)
|
||||
self.attenuation = ATTN_STATIC;
|
||||
|
||||
precache_sound (self.noise);
|
||||
ambientsound(center(self), self.noise, self.volume, self.attenuation);
|
||||
ambientsound (center (self), self.noise, self.volume,
|
||||
self.attenuation);
|
||||
} else {
|
||||
if (!self.volume) self.volume = 1.0;
|
||||
if (!self.attenuation) self.attenuation = ATTN_NORM;
|
||||
if (!self.volume)
|
||||
self.volume = 1.0;
|
||||
if (!self.attenuation)
|
||||
self.attenuation = ATTN_NORM;
|
||||
}
|
||||
|
||||
if (sv_spawning) {
|
||||
if (self.noise1) precache_sound(self.noise1);
|
||||
if (self.noise2) precache_sound(self.noise2);
|
||||
if (self.noise5) precache_sound(self.noise5);
|
||||
if (self.noise6) precache_sound(self.noise6);
|
||||
if (self.noise1)
|
||||
precache_sound (self.noise1);
|
||||
if (self.noise2)
|
||||
precache_sound (self.noise2);
|
||||
if (self.noise5)
|
||||
precache_sound (self.noise5);
|
||||
if (self.noise6)
|
||||
precache_sound (self.noise6);
|
||||
}
|
||||
|
||||
if (self.mangle)
|
||||
|
@ -76,24 +85,25 @@ void() util_map_entity_cull = {
|
|||
}
|
||||
}
|
||||
|
||||
if (self.model) safe_makestatic(self);
|
||||
else safe_remove(self);
|
||||
if (self.model)
|
||||
safe_makestatic (self);
|
||||
else
|
||||
safe_remove (self);
|
||||
};
|
||||
|
||||
void() util_map_entity_drop = {
|
||||
self.origin = self.origin + '0 0 2';
|
||||
if (!droptofloor ()) {
|
||||
dprint(self.classname, " fell out of level from ", vtos(self.origin), "\n");
|
||||
dprint (self.classname, " fell out of level from ", vtos (self.origin),
|
||||
"\n");
|
||||
remove (self);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
float() util_check_targets = {
|
||||
/*
|
||||
if (self.spawnflags & (SPAWNFLAGS_CHECK_ITEMS|SPAWNFLAGS_TAKE_ITEMS)) {
|
||||
}
|
||||
*/
|
||||
// if (self.spawnflags & (SPAWNFLAGS_CHECK_ITEMS|SPAWNFLAGS_TAKE_ITEMS)) {
|
||||
// }
|
||||
return TRUE;
|
||||
};
|
||||
|
||||
|
@ -144,21 +154,21 @@ float(entity e) is_solid = {
|
|||
};
|
||||
|
||||
float(entity e) is_teleportable = {
|
||||
return e.movetype != MOVETYPE_NONE &&
|
||||
return (e.movetype != MOVETYPE_NONE &&
|
||||
e.movetype != MOVETYPE_PUSH &&
|
||||
e.movetype != MOVETYPE_NOCLIP &&
|
||||
(e.solid == SOLID_BBOX || e.solid == SOLID_SLIDEBOX);
|
||||
(e.solid == SOLID_BBOX || e.solid == SOLID_SLIDEBOX));
|
||||
};
|
||||
|
||||
void() util_set_movedir = {
|
||||
if (self.mangle != '0 0 0')
|
||||
self.angles = self.mangle;
|
||||
|
||||
if (self.angles == '0 -1 0')
|
||||
if (self.angles == '0 -1 0') {
|
||||
self.movedir = '0 0 1';
|
||||
else if (self.angles == '0 -2 0')
|
||||
} else if (self.angles == '0 -2 0') {
|
||||
self.movedir = '0 0 -1';
|
||||
else {
|
||||
} else {
|
||||
makevectors(self.angles);
|
||||
self.movedir = v_forward;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue