.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Thread Tools
Modifying parameters passed to PM_Move
Lazy's Avatar
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Modifying parameters passed to PM_Move - 21-02-2008

With metamod there does not seem to be a way to modify the parameters passed to functions.
Take PM_Move for example, sure I can modify the parameters within my PM_Move function then call the mod's version but the problem is that even if I return MRES_SUPERCEDE other plugins will still have their PM_Move functions get called and if they do the same there could be trouble.

Example, typed in edit so it sucks:
void PM_Move( struct playermove_s* PMove, qboolean Server ) {
   PMove->blah = blah; // Do stuff with PMove
   MDLL_PM_Move( PMove, Server ); // Call mod's PM_Move with modified vars

Any ways around this?
I could overwrite the first few bytes of the mod's function with a jump to hook code which does what I want but that's really messy.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

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

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com