On Thu, 28 Aug 2003 19:36:42 -0400 Admin <[EMAIL PROTECTED]> wrote:

> Directly calling TakeDamage() in CS leads to a server crash or at least
> fudging the CBaseEntity to try to make the call to TakeDamage() leads to
> a server crash.

same for tfc... unless you call the function directly using whatever address it
is at on your particular machine.. I assume this is because CBaseEntity is
different in these mods, and we dont get the proper header in the SDK.

(gdb) print 'CBaseEntity::TakeDamage(entvars_s *, entvars_s *, float, int)'
$1 = {<text variable, no debug info>} 0x43896eb0

(casting issues aside)
void (*TakeDamage)(CBasePlayer *, entvars_s *, entvars_s *, float, int) = 0x43896eb0
TakeDamage(player, attacker, inflictor, dmgamount, type);

However, the address changes between the intel and amd binaries, will probably
change on an update, and changes across different machines, but it tends to
stay the same once you have found it.

Now if there is a way that you can lookup the address of the function at
runtime (since gdb can do it, there may be a way for a plugin to),
that might work reliably.  Its just something I've been kicking around in my
head but haven't really explored that far yet.  Also I havent tried any of this
under win32, just linux.




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

Reply via email to