Raised This Month: $32 Target: $400
 8% 

Proper removal of Monster Mod monsters on round end in CS or CZ


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 10-01-2009 , 19:11   Proper removal of Monster Mod monsters on round end in CS or CZ
Reply With Quote #1

Just asking for advice on removal of Monster Mod monsters on round end in CS or CZ.


Here is what I'm thinking of using for removal:
Code:
    new monster = -1     while ( (monster = engfunc(EngFunc_FindEntityByString, monster, "classname", "func_wall")) != 0 ) {         if ( pev(monster, pev_flags) & FL_MONSTER ) {             engfunc(EngFunc_RemoveEntity, monster)         }     }


a. are all monsters func_wall?
b. do all monsters have FL_MONSTER flag? do other fun_wall's have this flag? I only want to remove Monster Mod monsters not other things.
c. anything wrong with just removing the monsters? like do i need to kill it by settings it's health to 0 instead, or set FL_KILLME flag or something?
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 10-01-2009 , 19:31   Re: Proper removal of Monster Mod monsters on round end in CS or CZ
Reply With Quote #2

PHP Code:
template <class TCreateClassPtr*)
{
    ...

    if ((
temp_edict a->CreateEntity("func_wall")) == NULL)
    {
    ... 
a - Yes

PHP Code:
void CMBaseMonster :: MonsterInit void )
{
    ...
    
SetBits (pev->flagsFL_MONSTER);
... 
b - Yes. If it is possible that other func_wall have it? Yes. If they have in fact? I don't think so. I don't know of other usages of func_wall except this and in mapping

c - I believe its ok.
__________________
joaquimandrade is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 10-02-2009 , 00:48   Re: Proper removal of Monster Mod monsters on round end in CS or CZ
Reply With Quote #3

Thanks joaquim,

I should have just checked the source myself, kinda slipped my mind to do that.


I decided to go with FL_KILLME rather than just removing the ents because it will show them die (setting health to 0 also had this effect, but I figured this would be better).
Code:
    new monster = -1     new flags     while ( (monster = engfunc(EngFunc_FindEntityByString, monster, "classname", "func_wall")) != 0 ) {         flags = pev(monster, pev_flags)         if ( flags & FL_MONSTER ) {             set_pev(monster, pev_flags, flags | FL_KILLME)         }     }

Also thinking round start on HLTV event might be better than round end.

Last edited by vittu; 10-02-2009 at 00:52.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode