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

How to set Velocity like TeleportEntity does without teleporting?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShadowManGer
Member
Join Date: May 2013
Old 09-19-2019 , 17:01   How to set Velocity like TeleportEntity does without teleporting?
Reply With Quote #1

Hello folks,

I'm currently struggling with setting the velocity of a client. The current implementation uses `TeleportClient`
Code:
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, newVelocity);
But the downside is, that the entities on the map are re-initialized on each teleport. So I'm looking for a solution to set the velocity without teleporting.

I've tried setting the velocity with
Code:
SetEntPropVector(client, Prop_Data, "m_vecVelocity", newVelocity);
but the player velocity slows down immediately. And using
Code:
SetEntPropVector(client, Prop_Data, "m_vecBaseVelocity", newVelocity);
then the new velocity is to strong and the player is flying away.

So has anyone an idea how to set the players velocity without using `TeleportEntity`?
ShadowManGer is offline
ShadowManGer
Member
Join Date: May 2013
Old 09-20-2019 , 06:23   Solution
Reply With Quote #2

I've found a solution. I've set the absolute velocity for the players entity

PHP Code:
SetEntPropVector(clientProp_Data"m_vecAbsVelocity"newVelocity); 
Hope some of you find it useful
ShadowManGer is offline
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 01:26.


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