ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[ACS] Thing_Remove() and friendly monsters

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Fixed Bugs
View previous topic :: View next topic  
Author Message
rhinoduck
Potatoes


Joined: 22 Oct 2012

PostPosted: Thu Sep 07, 2017 2:01 am    Post subject: [ACS] Thing_Remove() and friendly monsters Reply with quote

The Thing_Remove() ACS function will decrement the LEVELINFO_TOTAL_MONSTERS value, which is obtainable using a GetLevelInfo() call, even when removing a friendly monster. This can lead to the value being decremented twice if a call to SetActorProperty() setting the APROP_Friendly property from FALSE to TRUE has been made before for the same monster, because this call already decremented the LEVELINFO_TOTAL_MONSTERS value.

I don't know how friendly monsters are treated in relation to the monster counter, but it seems like they should not be counted, in which case Thing_Remove() should not decrement the value when it is removing a friendly monster. OTOH, if they should be counted, then SetActorProperty() should not mess with the counter when changing monster friendliness (APROP_Friendly).
Back to top
View user's profile Send private message
Kilgore
Air Cavalry


Joined: 17 Jun 2003
Location: Up the river

PostPosted: Wed Jan 31, 2018 2:30 am    Post subject: Reply with quote

Fixed.
Back to top
View user's profile Send private message Visit poster's website
rhinoduck
Potatoes


Joined: 22 Oct 2012

PostPosted: Thu Feb 01, 2018 6:08 am    Post subject: Reply with quote

What has been initially described in this issue now works fine as friendly-monster-counting-test.mp4 shows. But the test also revealed one more remaining issue pertaining to friendly monsters; they increment the killed monsters counter when they die; they shouldn't (at least for the reason that this way you can get killed_monsters > total_monsters).

Testing can be repeated using rhinolib-dev20180123 as shown in the video.
Back to top
View user's profile Send private message
Kilgore
Air Cavalry


Joined: 17 Jun 2003
Location: Up the river

PostPosted: Thu Feb 01, 2018 9:55 am    Post subject: Reply with quote

Fixed too.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Fixed Bugs All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group