hey guys… Ive been working on fixing some etmain bugs… Ive run into the riflenade exploit (which I havent fixed yet) as well as the dual objective not returning like it supposed to
gentity_t *Team_ResetFlag(int team)
{
char *c;
gentity_t *ent, *rent = NULL;
switch (team)
{
case TEAM_AXIS:
c = "team_CTF_redflag";
break;
case TEAM_ALLIES:
c = "team_CTF_blueflag";
break;
default:
return NULL;
}
ent = NULL;
while ((ent = G_Find (ent, FOFS(classname), c)) != NULL)
{
if (ent->flags & FL_DROPPED_ITEM)
{
G_FreeEntity(ent);
} else {
rent = ent;
ent->s.density++;
// do we need to respawn?
if( ent->s.density == 1 )
{
RespawnItem(ent);
}
}
}
return rent;
}
I can now get the object to return to its original spawns spot however I can not get where it was recovered from to disapear… I tried G_Freeentity(ent) after respawnItem… but that just got rid of the object all together from the map
when an item is dropped you can not pick it up again until its secured… when secured
the old objective can be picked up again and ran to the spot you need to go however because its null it will not do anything
any ideas on how to get rid of the old already recovered objective thats still on the map?
Im obviously not doing something right somewhere :banghead: