Re: switching player/bot:coding question -
03-02-2010
You can't use directly ClientCommand as long as I remeber. Use FakeClientCommand function instead(you can find it in any bot code here), for move commands use RunPlayerMove().
As for swapping bot-player, the easy way is as Whistler pointed out to switch the bot and player data(ammo, weapons, etc) and after that just move the edicts. I mean that after you done the bot-player items switch you just have to move the bot edict at the place of the player one, and place the player edict on the bot previous position, in this way you will not get unproper screen. About the HUD, just do some message tracking to see what messages are sent to the clients to update the HUD and after you got the needed data, just send the same messages to the swappet player. This is the best way I can think off.
|