Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public FM_ServerFrame()
- {
- if(g_bot_enable == 1 && g_bot_id)
- {
- if(g_bot_frame < ArraySize(g_DemoReplay[g_bot_type]))
- {
- static id;
- id = g_bot_id;
- if(!is_user_alive(id))
- {
- dllfunc(DLLFunc_Spawn, id);
- set_pev(id, pev_health, 99999.0);
- Start_Bot();
- }
- else if(get_gametime() >= g_bot_movedelay + ArrayData[flFrameLength])
- {
- g_bot_movedelay = get_gametime();
- g_bot_movedelay = get_gametime();
- }
- else
- {
- new ArrayData[DemoData];
- new i
- for(i = 0; i < g_bot_speed; i++)
- {
- ArrayGetArray(g_DemoReplay[g_bot_type], g_bot_frame, ArrayData);
- if(ArrayData[iButton]&IN_ALT1)
- ArrayData[iButton]|=IN_JUMP;
- if(ArrayData[iButton]&IN_RUN)
- ArrayData[iButton]|=IN_DUCK;
- if(ArrayData[iButton]&IN_RIGHT)
- {
- engclient_cmd(id, "weapon_usp");
- ArrayData[iButton]&=~IN_RIGHT;
- }
- if(ArrayData[iButton]&IN_LEFT)
- {
- engclient_cmd(id, "weapon_knife");
- ArrayData[iButton]&=~IN_LEFT;
- }
- g_bot_buttons = ArrayData[iButton];
- BotMove(id, g_bot_frame, ArrayData[flFrameLength], ArrayData[flBotAngle], ArrayData[flBotVel], ArrayData[flBotPos], ArrayData[iButton]);
- //set_pev(id, pev_button, ArrayData[iButton]);
- g_bot_frame++;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement