MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000126Soldat Dedicated ServerScripting Corepublic2011-10-31 20:272012-08-23 21:23
Reporterfri 
Assigned ToFalcon 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionsuspended 
Platformx64OSWindowsOS Version7 SP1
Product Version2.7.2 
Target VersionFixed in Version 
Summary0000126: Bots not triggering some scriptcore events
DescriptionThere are some differences between bots and humans in triggering scriptcore events. To check it, I made a simple script to show a nickname and name of event triggered:

procedure onweaponchange(id, primarynum, secondarynum: byte);
begin
    writeln(idtoname(id) + ' triggered OnWeaponChange');
end;

procedure onjoingame(id, team: byte);
begin
    writeln(idtoname(id) + ' triggered OnJoinGame');
end;

procedure onjointeam(id, team: byte);
begin
    writeln(idtoname(id) + ' triggered OnJoinTeam');
end;

procedure onleavegame(id, team: byte; kicked: boolean);
begin
    writeln(idtoname(id) + ' triggered OnLeaveGame');
end;

procedure onflaggrab(id, teamflag: byte; grabbedinbase: boolean);
begin
    writeln(idtoname(id) + ' triggered OnFlagGrab');
end;

procedure onflagreturn(id, teamflag: byte);
begin
    writeln(idtoname(id) + ' triggered OnFlagReturn');
end;

procedure onflagscore(id, teamflag: byte);
begin
    writeln(idtoname(id) + ' triggered OnFlagScore');
end;

procedure onplayerrespawn(id: byte);
begin
    writeln(idtoname(id) + ' triggered OnPlayerRespawn');
end;


While most of them work properly with bots, two don't: OnJoinGame and OnJoinTeam. Additionally, if a human joins the game, OnPlayerRespawn is triggered before anything else (shouldn't it fire after OnJoinTeam?).

Comparison human-bot in joining:
[ human ]
127.0.0.1:59941 requesting game...
fri joining game (127.0.0.1:59941) HWID:---
fri triggered OnPlayerRespawn
fri triggered OnJoinGame
fri has joined alpha team.
fri triggered OnJoinTeam
fri triggered OnWeaponChange (bare fists, before weapon menu shows up)
fri triggered OnWeaponChange (after choosing a weapon)

[ bot ]
/addbot1 Commando(127.0.0.1[fri])
Commando triggered OnPlayerRespawn
Commando triggered OnWeaponChange

As you can see, bots don't cause OnJoinGame and OnJoinTeam events to fire. They should at least trigger OnJoinTeam.


Also, on leaving, humans trigger OnWeaponChange, while bots don't. I find it trivial, but I'm reporting it anyway.
TagsNo tags attached.
John
Attached Files

- Relationships

-  Notes
(0001251)
tk (reporter)
2011-11-02 13:10

Bots trigger onweaponchange too.
(0001252)
fri (reporter)
2011-11-02 13:35

I checked it a few times and a kicked bot didn't trigger OnWeaponChange as a human did.

I should clear something up too: bots DO trigger OnJoinTeam, but only after using /setteam on them. The issue is that they don't trigger OnJoinTeam on /addbot.
(0001578)
Falcon (administrator)
2012-08-23 21:23

I'm not sure if i'll be fixing this, my scripts does rely on that behavior so i assume that others might "abuse" that too

- Issue History
Date Modified Username Field Change
2011-10-31 20:27 fri New Issue
2011-11-02 13:10 tk Note Added: 0001251
2011-11-02 13:35 fri Note Added: 0001252
2011-12-21 10:47 Shoozza Status new => acknowledged
2012-02-29 20:13 Falcon Assigned To => Falcon
2012-02-29 20:13 Falcon Status acknowledged => assigned
2012-08-23 21:23 Falcon Note Added: 0001578
2012-08-23 21:23 Falcon Status assigned => closed
2012-08-23 21:23 Falcon Resolution open => suspended


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker