Raised This Month: $51 Target: $400
 12% 

[H3LP] Opposing Force Map Type


Post New Thread Reply   
 
Thread Tools Display Modes
DarthMan
Veteran Member
Join Date: Aug 2011
Old 12-19-2018 , 12:20   Re: [H3LP] Opposing Force Map Type
Reply With Quote #11

Quote:
Originally Posted by KliPPy View Post
If a map needs those 6 types of entities to exist to be treated as CTF, then that's the valid method.
Then I guess, I'll stick with this method.
DarthMan is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-19-2018 , 12:26   Re: [H3LP] Opposing Force Map Type
Reply With Quote #12

You can post the server .so as well so someone could possibly find out under what condition will InstallGameRules return a CHalfLifeCTFPlay pointer.
__________________
klippy is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 12-20-2018 , 06:41   Re: [H3LP] Opposing Force Map Type
Reply With Quote #13

Quote:
Originally Posted by KliPPy View Post
You can post the server .so as well so someone could possibly find out under what condition will InstallGameRules return a CHalfLifeCTFPlay pointer.
Here:
https://ufile.io/y7ym5
DarthMan is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-20-2018 , 08:51   Re: [H3LP] Opposing Force Map Type
Reply With Quote #14

Turns out it checks if spawnflags & 8 is true for the "worldspawn" entity. That spawnflag is set if "worldspawn" entity's keyvalue "defaultctf" == 1, in CWorld::KeyValue. I don't know if there are any other cases where spawnflags may be OR'd with 8, but it's unlikely because this decision has to be made while the world is spawning (before any other entities have spawned I think).
Now I'm not quite sure if you can do operations on the "worldspawn", such as calling pev to get pev_spawnflags, you'll have to figure out the rest yourself. May as well hook KeyValue.
__________________

Last edited by klippy; 12-20-2018 at 08:55.
klippy is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 12-20-2018 , 12:06   Re: [H3LP] Opposing Force Map Type
Reply With Quote #15

Quote:
Originally Posted by KliPPy View Post
Turns out it checks if spawnflags & 8 is true for the "worldspawn" entity. That spawnflag is set if "worldspawn" entity's keyvalue "defaultctf" == 1, in CWorld::KeyValue. I don't know if there are any other cases where spawnflags may be OR'd with 8, but it's unlikely because this decision has to be made while the world is spawning (before any other entities have spawned I think).
Now I'm not quite sure if you can do operations on the "worldspawn", such as calling pev to get pev_spawnflags, you'll have to figure out the rest yourself. May as well hook KeyValue.
I will try, if not, FM_KeyValue will do :-)
Thanks !
DarthMan is offline
Reply



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 11:10.


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