sourcemod
sourcemod copied to clipboard
[FOF] TeleportEntity does not work
Help us help you
- [X] I have checked that my issue doesn't exist yet.
- [X] I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
- [X] I can always reproduce the issue with the provided description below.
Environment
- Operating System version: Debian 11 (linux)
- Game/AppID (with version if applicable): 295230
- Current SourceMod version: 1.12.0.6976
- Current SourceMod snapshot: 1.12.0.6976
- Current Metamod: Source snapshot: 1.12.0-dev+1165
- [X] I have updated SourceMod to the latest version and it still happens.
- [X] I have updated SourceMod to the latest snapshot and it still happens.
- [X] I have updated SourceMM to the latest snapshot and it still happens.
Description
After Sig Fix, everything works again except TeleportEntity. There's graphics, can control movement speed, etc.
These things now work after the signature fix: player's speed manipulation, special effects graphics like Chronosphere and Lightbender's beams of light and no error codes about the signature issue.
TeleportEntity does not work. no errors, no logs, no crashes.
I talked with multiple people in SourceMod's Discord server on things to do about it...eventually was told to just create a issue on it.
I installed IDA and looked around. I'm no hacker, so I do my best, but I could not figure out what to do with the information in front of me. I understand finding vtables, but I don't have any c++ or assembly skill to make this work again.
I was looking at the tf2-attributes code and trying to figure out if I could maybe code it in SourceMod, but I'm burning my brain cells trying to wrap my head around the SDKcall functions to interact with it. I'm basically shooting blind-folded. I would be gratefully humble if anyone would take a stab at getting this working again.
Thank you so much for your time in this matter. It means a great deal to me.
Problematic Code (or Steps to Reproduce)
All these plugins I have tried (I also used all default SourceMod plugins along with these plugins):
plugin Blink : https://forums.alliedmods.net/showthread.php?p=610457
War3Evo War3Source: https://forums.alliedmods.net/editpost.php?do=editpost&p=2430764
Player-Teleport https://forums.alliedmods.net/showthread.php?p=1042766
Logs
There's no crash or error code.
- Please attach in separate files: game output, library logs, kernel logs, and any other supporting information.
- In case of a crash, please attach minidump or dump analyze output.
Just for info. Game developer have either stripped or re-invented teleport function to CFoF_Player. Something like that.
You can test,
sv_cheats 1
setpos 100 100 100
setpos_exact 0 0 100
ent_teleport entity_index
setpos command works differently and it moves player origin to pos. setpos_exact command again use CBaseEntity Teleport function like in other games, it not work in FoF.
ent_teleport command not work in FoF
There is more.
Entities like trigger_teleport
& point_teleport
, do not teleport player in FoF game.
But can teleport other entities (ex. prop_physics_multiplayer).
Thank you Ambaca for shining new light on this issue :)
When I was searching the Text in IDA free in server.so... I saw "AllowTeleport" or "Allow Teleport", most likely the first statement. I wonder if that needs to be hooked to bypass the prevented function? I don't know much about programming c++ to even know how to implement that if it is possible.
Thank you Ambaca for shining new light on this issue :)
When I was searching the Text in IDA free in server.so... I saw "AllowTeleport" or "Allow Teleport", most likely the first statement. I wonder if that needs to be hooked to bypass the prevented function? I don't know much about programming c++ to even know how to implement that if it is possible.
I assume it relate to one entity ai_goal_actbusy Checking npc animation and so on
Okay..
On another Post in Allied Modders, Grey83 says:
You can try this function for teleport (but works correctly only with standing players):
SetEntPropVector(client, Prop_Send, "m_vecOrigin", fPos);
https://forums.alliedmods.net/showpost.php?p=2798897&postcount=2
That actually works for FOF!
Now if I can figure out how to make it so, that the game thinks the player is "still" while moving them.
It sucks you have to completely stop moving to be able to move.
*** Current work around *** OnGameFrame you should SetEntityMoveType(client,MOVETYPE_NONE); then after 0.05 seconds timer stop setting that moveType.
As soon as you give OnGameFrame to set that movement type, you need to SetEntPropVector(client, Prop_Send, "m_vecOrigin", fPos); so that it can teleport.