.:: 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 > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
how to let REAL players move ?
Old
  (#1)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default how to let REAL players move ? - 16-01-2004

For some reason I don't get this to work.... Setting v.button to IN_FORWARD doesn't work, execute "+forward" gives an unknow command error. Only with runplayermove you can let players move but then you have to set FL_FROZEN otherwise you get weird movement(a bit shocky). Does anyone know a way how todo it ?

Thanx in advance
  
Reply With Quote
Re: how to let REAL players move ?
Old
  (#2)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: how to let REAL players move ? - 16-01-2004

The only thing I can guess is to update their velocity to whatever velocity you want (in pev->velocity)

Maybe an UpdateClientData would work after setting pev->buttons |= IN_FORWARD, or a DispatchThink().
  
Reply With Quote
Re: how to let REAL players move ?
Old
  (#3)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: how to let REAL players move ? - 17-01-2004

thanx ... but it didn't work
Calling updateclientdata or dispatchthink won't do anythink and setting the velocity gives weird results like no gravity. Unless I do it completely wrong...
Code:
pEntity->v.button |= IN_FORWARD;
UTIL_MakeVectors(pEntity->v.v_angle);
pEntity->v.velocity = gpGlobals->v_forward * pEntity->v.maxspeed;
But then I find it weird that +forward won't work or FakeClientCommand on a normal client failes on this
  
Reply With Quote
Re: how to let REAL players move ?
Old
  (#4)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: how to let REAL players move ? - 17-01-2004

yeah +forward wont work because its not a nnormal cvar command. (Uses pfnAddCommand) which uses the input keys stuff on the client. (Have a look at keyDown on the sdk..) I don't think you can access that stuff though a server

oh yea.. for the gravity stuff you can maybe add your own code to not update the velocity at certain points if the player is falling (not on ground) etc.

and you could also try PlayerPostThink on the player after setting the buttons, can't remember if pre-think resets the buttons or something, but since its done on the client I would guess not.

Last edited by Cheeseh; 17-01-2004 at 14:20..
  
Reply With Quote
Re: how to let REAL players move ?
Old
  (#5)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: how to let REAL players move ? - 17-01-2004

i remembered that Android Bot could even get your player be controlled by a bot. So how did he dod that? There has to be some possiblity?


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: how to let REAL players move ?
Old
  (#6)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: how to let REAL players move ? - 17-01-2004

yes... count floyd does this aswell for his 'borg mode'. I have something simulair based on his code. I dunno if he uses the same way as the android bot author did but he just uses runplayermove on a normal client. But he removes the flag FL_FROZEN before he calls the function and he sets it after the function is called. If you won't do this you will move kinda weird(a bit shocky). But if you set FL_FROZEN player can't charge any attacks.... and since this its very common in esf to charge an attack...

And I tried setting IN_FORWARD in postthink but with no luck I remember something that it won't work with all kinda buttons.
  
Reply With Quote
Re: how to let REAL players move ?
Old
  (#7)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: how to let REAL players move ? - 18-01-2004

AFAIK the only way to force a player animation is through RunPlayerMove()... you can't force a client to send instant client commands (it would mean that your DLL on the server would need to send a network message to this client to ask him to press certain buttons, and the client would reply back with the right network messages... this is just silly)



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


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