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

Orpheu: Engine PM Functions


Post New Thread Reply   
 
Thread Tools Display Modes
Lt.RAT
Member
Join Date: Sep 2008
Location: Russia Yekaterinburg
Old 05-07-2010 , 13:16   Re: Orpheu: Engine PM Functions
Reply With Quote #11

Need to block any player "key" movement, but save movetype_walk, did test plugin, and wonder why it`s not working

PHP Code:
#include <amxmodx> 
#include <fakemeta> 

#include <orpheu> 
#include <orpheu_memory> 
#include <orpheu_advanced> 

public plugin_init() 

    
register_plugin("cmd_test""0.1""Lt.RAT"
     
    
OrpheuRegisterHook(OrpheuGetFunction("PM_Move"),"OnPM_move"); 


public 
OnPM_move(move,server

//    new id = OrpheuGetParamStructMember( 1 , "player_index" ) + 1; 

    
new OrpheuStruct:cmd OrpheuStruct:OrpheuGetParamStructMember"cmd" ); 

    
//set_uc(_:cmd, UC_Msec, 2); //working (like plugin slow-mo) 

    
static Float:d0,Float:d1,Float:d2
    
d0 OrpheuGetStructMember(cmd"forwardmove"); //ret correct value 
    
d1 OrpheuGetStructMember(cmd"sidemove"); //ret correct value 
    
d2 OrpheuGetStructMember(cmd"upmove"); //ret correct value 

    
set_uc(_:cmdUC_ForwardMove0); //not working 
    
set_uc(_:cmdUC_SideMove0); //not working 
    
set_uc(_:cmdUC_UpMove0); //not working 

    
OrpheuSetStructMember(cmd"forwardmove"0); //not working 
    
OrpheuSetStructMember(cmd"sidemove"0); //not working 
    
OrpheuSetStructMember(cmd"upmove"0); //not working 
    
OrpheuSetStructMember(cmd"buttons"0); //not working 

"not working" means no effect in PM_Move and other PM_ functions (you can run in any direction you want).

ADD:
Right, it works Something happened and before full server restart it wont work

Shooting and punchangle calculated with cmd from DLLFunc_CmdStart as i know.

Last edited by Lt.RAT; 05-07-2010 at 16:34.
Lt.RAT is offline
Send a message via ICQ to Lt.RAT
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-07-2010 , 13:43   Re: Orpheu: Engine PM Functions
Reply With Quote #12

It works for me ( I can not move at all ) except shooting which is not blocked.
__________________

Last edited by Arkshine; 05-07-2010 at 16:00.
Arkshine is offline
Lt.RAT
Member
Join Date: Sep 2008
Location: Russia Yekaterinburg
Old 05-09-2010 , 11:52   Re: Orpheu: Engine PM Functions
Reply With Quote #13

Wrote signatures for some functions.

Hook of PM_Init, PM_CreateStuckTable and PM_InitTextureTypes not possible coz Orpheu loads after their work.

Tested signatures with several libraries.
For
Code:
PM_WaterMove
PM_ClipVelocity
PM_FlyMove
there is no way to create universal signatures (from start of functions)

All checks passed:
Code:
PM_CatagorizeTextureType
PM_CheckFalling
PM_CheckParamters
PM_CheckStuck
PM_CheckVelocity
PM_CheckWater
PM_CheckWaterJump
PM_ClipVelocity
PM_CreateStuckTable
PM_Duck
PM_FindTextureType
PM_Init
PM_InitTextureTypes
PM_Jump
PM_Ladder
PM_LadderMove
PM_Move
PM_Physics_Toss
PM_PlayerMove
PM_PlayStepSound
PM_ReduceTimers
PM_WalkMove
Good only for latest server build (maybe better to use offsets instead of them in this case)
Code:
PM_AirAccelerate
PM_AirMove
PM_CatagorizePosition
PM_FlyMove
PM_Friction
PM_SpectatorMove
PM_UpdateStepSound
PM_WaterMove
Attached Files
File Type: zip Orpheu_pm_shared.zip (10.8 KB, 1199 views)

Last edited by Lt.RAT; 05-09-2010 at 12:01.
Lt.RAT is offline
Send a message via ICQ to Lt.RAT
Old 05-10-2010, 10:24
lazarev
This message has been deleted by lazarev. Reason: Checked the link :/
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-11-2010 , 09:01   Re: Orpheu: Engine PM Functions
Reply With Quote #14

Can someone make a sig for PM_DropPunchAngle?
lazarev is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-11-2010 , 09:27   Re: Orpheu: Engine PM Functions
Reply With Quote #15

You can't hook it for 2 reasons :

- It's integrated into PM_CheckParamters()
- I guess vec3_t can't be used with orpheu.
__________________
Arkshine is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-11-2010 , 10:00   Re: Orpheu: Engine PM Functions
Reply With Quote #16

vec3_t = Float:Vec[3];

I checked PM_AiraAccelerate sig, it has
Code:
"type" : "Vector *",
"info" : "wishdir"
wishdir is vec3_t.

Last edited by lazarev; 05-11-2010 at 10:05.
lazarev is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-11-2010 , 10:03   Re: Orpheu: Engine PM Functions
Reply With Quote #17

I know and ?
__________________
Arkshine is offline
Lt.RAT
Member
Join Date: Sep 2008
Location: Russia Yekaterinburg
Old 05-11-2010 , 15:30   Re: Orpheu: Engine PM Functions
Reply With Quote #18

Yeah, i`ve confronted with vec3_t problem when tried to write signature.
vec3_t is vec_t[3] and vec_t is float.
I`ve tried and tested Vector instead of vec3_t and found that it works. And used in that declaration Vector instead of vec3_t.

Quote:
Originally Posted by lazarev View Post
Can someone make a sig for PM_DropPunchAngle?
Quote:
Originally Posted by Arkshine View Post
You can't hook it:
- It's integrated into PM_CheckParamters()
The only one thing we can do - emulate code of function.


I have a question: How to use pmove->PM_PlayerTrace and all other funcs in playermove_t?

Last edited by Lt.RAT; 05-11-2010 at 15:40.
Lt.RAT is offline
Send a message via ICQ to Lt.RAT
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 05-11-2010 , 15:39   Re: Orpheu: Engine PM Functions
Reply With Quote #19

Can't vec3_t be read as a chunk of bytes and convert to float vectors with pawn?
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Lt.RAT
Member
Join Date: Sep 2008
Location: Russia Yekaterinburg
Old 05-11-2010 , 15:51   Re: Orpheu: Engine PM Functions
Reply With Quote #20

Quote:
Originally Posted by joropito View Post
Can't vec3_t be read as a chunk of bytes and convert to float vectors with pawn?
Vectors in pawn chunk of bytes too But it`s ok in code, but what about function arguments ?
Lt.RAT is offline
Send a message via ICQ to Lt.RAT
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 05:49.


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