Issue876

Title (Novice) Arena bot corpses never disappear
Priority feature Status open
Assigned To digifuzzy Keywords
Linked issues Watchers digifuzzy

Submitted on 2017-02-19 00h02 by o11c, last changed by jesusalva.

Messages
Author: o11c Date: 2017-02-19   00h02
Most corpses disappear when the corresponding region respawns everything. 
However, 
apparently the (Novice) Arena has a "no respawn" map flag.

Note that there are at least 2 major design problems:

* Bots spawned by scripts are not special, making the "no respawn" map flag 
necessary 
(in a proper world, it should not exist at all). The "will_respawn" bot flag 
could 
probably be used here.

* Bots will respawn on the level they die, not the level they are originally 
from. I 
haven't investigated whether this causes bad interactions with waypoints, but: < 
RazorSharpFang> On older versions if a bot revived on a map not its own and could 
not 
path to its origin waypoint the engine would crash. : /

It would be a good idea in general (i.e. even for normal bots) for corpses to 
disappear even if you don't leave the region, so map.c:respawn_level (thanks 
jesusalva 
for doing a little source diving) needs some serious rethinking. There needs to 
be 
separate states "dead and visible" (or all bots) vs "dead and waiting for 
respawn" 
(which would *only* be used for non-script-based bots, since script-based bots 
should 
be deleted entirely).
Author: jesusalva Date: 2017-02-19   00h54
I've added on Review Board http://rb.freedroid.org/r/2320 a patch so scripted
droids doesn't respawn by default.

I've been checking a few things but when I've touched the graphic repository
I've remembered that a dead corpse is part from the enemy, so what I've gathered
thus far is:

There's no "corpse". 
The corpse is, nothing more and nothing less, how the enemy looks after having died.

To erase the "corpse" you need to get rid from the enemy altogether.

* If we replaced the dead enemy with a volatile obstacle and got it "invisible",
it could be done rather easily: But, uh, I don't think I need to comment on that
approach.

* Another approach is a function to delete dead bots and free some memory. That
solves the problem on the arena but it's a somewhat dangerous function.
After all, how will you know what is on the dead list? =) 
While on the Arena that work pretty well, in some places it offers a share of risks.

Anyway, if you guys think on something else fell free to comment.
Also, at fluzz request, done at 2017-02-18 22:35:42 UTC, changing priority from
“bug” to “feature”.
Author: digifuzzy Date: 2017-02-19   06h05
Update and Claiming for work.
Author: digifuzzy Date: 2017-02-19   06h08
Situation was discussed on IRC w/ RazorSharpFang.
Will work collaboratively with RazorSharpFang to provide solution to RB.
Proposed solution is to utilize the remove_volatile_obstacles_from_tile() from
obstacle.c for all arena tiles. This would be setup in a routine callable by
MIKE droid when player completes a level in the Novice Arena.
Author: jesusalva Date: 2017-04-01   03h04
Sorry my fault I completly overlooked that there was already a patch for this on RB.

 http://rb.freedroid.org/r/2045/

This is the patch by Greg is an approach to fix this issue by adding a function
to delete all dead bots.
History
Date User Action Args
2017-04-01 03:04:26jesusalvasetmessages: + msg3456
2017-02-19 06:08:03digifuzzysetmessages: + msg3414
2017-02-19 06:05:41digifuzzysetassignedto: digifuzzy
messages: + msg3413
nosy: + digifuzzy
2017-02-19 00:54:09jesusalvasetpriority: bug -> feature
messages: + msg3411
2017-02-19 00:02:01o11ccreate