Hi,

I'm having some problems with my gametype code. Once, I asked here how to
do map-specific gametype, and I did it - it creates specific
GamerulesObject depending on map prefix. However, there is a problem with
pointers, that is there is function in hl2mprules like this:

inline CHL2MPRules* HL2MPRules()
{
 return static_cast<CHL2MPRules*>(g_pGameRules);
}

It is used sometimes in code as pointer HL2MPRules(). What I want to do is
that this function returns different rules class depending on actual
gametype, so I can actually access those in the code (for ctf, etc.). But
of course inline functions cant be virtual and I also must change the
return type for every gametype. I thought about using templates, but didnt
actually invent anything that could be useful. Did someone fix this
problem on his own? :)

Thanks in advance.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to