hi!
is there such a command in dp?
i highlighted it red, cause i dont want that the grunt gib a corpse.
if (killed or shoot by a grunt)
self.health=0;
else if (killed or shoot by the player)
self.health=25;
self.th_stand = SUB_Null;
self.th_walk = SUB_Null;
self.th_run = SUB_Null;
self.th_pain = SUB_Gib;
self.th_die = army_really_die;
self.th_melee = SUB_Null;
self.th_missile = SUB_Null;
self.takedamage= DAMAGE_YES;
self.flags = self.flags &! FL_MONSTER;
Unknown Command
-
- InsideQC Staff
- Posts: 1120
- Joined: Sat Oct 16, 2004 3:34 pm
Re: Unknown Command
Are you actually doing this?smd wrote:self.flags = self.flags &! FL_MONSTER;
It may work for the case where FL_MONSTER is the only flag set, but what it actually does is remove ALL flags.
FL_MONSTER = 32
!FL_MONSTER = 0
anything & 0 = 0
So you're setting self.flags to 0.
! (logical not) is not a substitute for ~ (bitwise complement). QuakeC doesn't have ~ because it wouldn't work so well with floats. So in QuakeC the correct way to remove a flag is:
self.flags = self.flags - (self.flags & FL_MONSTER);
Or the equivalent:
if (self.flags & FL_MONSTER)
self.flags = self.flags - FL_MONSTER;
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
sorry, but i need your help again :?
i have gibbable corpses, so i can also walk through them and gib them.
all works good, but sometimes suddendly all corpses become solid and i cant walk through them anymore and also all the teleporters in the map dont work then. So i cant finish shub-nigguraths pit for example, cause the teleport dont work. thats really weird!
i hope for a little help
i have gibbable corpses, so i can also walk through them and gib them.
all works good, but sometimes suddendly all corpses become solid and i cant walk through them anymore and also all the teleporters in the map dont work then. So i cant finish shub-nigguraths pit for example, cause the teleport dont work. thats really weird!
i hope for a little help
i found out that it has something to do with the w_fireaxe
void() W_FireAxe =
{
local float oldsolid;
local vector source;
local vector org;
makevectors (self.v_angle);
source = self.origin + '0 0 16';
if (ext_solidcorpse == TRUE)
{
oldsolid = self.solid;
self.solid = SOLID_BBOX;
}
traceline (source, source + v_forward*64, FALSE, self);
if (trace_fraction == 1.0)
return;
org = trace_endpos - v_forward*4;
if (trace_ent.takedamage)
{
trace_ent.axhitme = 1;
SpawnBlood (org, '0 0 0', 20);
T_Damage (trace_ent, self, self, 20);
}
else
{ // hit wall
sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_GUNSHOT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
}
if (ext_solidcorpse == TRUE)
self.solid = oldsolid;
};
wihtout the red code pieces = its the original fireaxe, i cant gib the corpses.
with the red code = i can gib with the axe, but after one slash with the axe, the corpses are all solid and the teleporters dont work!
void() W_FireAxe =
{
local float oldsolid;
local vector source;
local vector org;
makevectors (self.v_angle);
source = self.origin + '0 0 16';
if (ext_solidcorpse == TRUE)
{
oldsolid = self.solid;
self.solid = SOLID_BBOX;
}
traceline (source, source + v_forward*64, FALSE, self);
if (trace_fraction == 1.0)
return;
org = trace_endpos - v_forward*4;
if (trace_ent.takedamage)
{
trace_ent.axhitme = 1;
SpawnBlood (org, '0 0 0', 20);
T_Damage (trace_ent, self, self, 20);
}
else
{ // hit wall
sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_GUNSHOT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
}
if (ext_solidcorpse == TRUE)
self.solid = oldsolid;
};
wihtout the red code pieces = its the original fireaxe, i cant gib the corpses.
with the red code = i can gib with the axe, but after one slash with the axe, the corpses are all solid and the teleporters dont work!
Put the second red bit before the 'if (trace_fraction == 1) return;' bit.
Otherwise, everytime you miss, the player is stuck as SOLID_BBOX forever.
It's customary to reset the solid right after the traceline. I usually make a function called traceline_hitcorpse to make this easy.
Otherwise, everytime you miss, the player is stuck as SOLID_BBOX forever.
It's customary to reset the solid right after the traceline. I usually make a function called traceline_hitcorpse to make this easy.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.