2019-12-08 01:24 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000910Spring engineGeneralpublic2008-04-30 02:58
Reporterzenzike 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000910: [patch] HandleChatMsg reordering
DescriptionI'm building an AI that listens to the chat prompt, and acts accordingly. The problem I noticed was that the GlobalAI received the message before any of the players. Consequently, confirmation messages sent by the AI about the typed message were appearing before the message itself: it looked a bit like the AI was an oracle!

I've submitted a small patch in mantis that just puts AI handling of messages after that of players.

Thread link:
http://spring.clan-sy.com/phpbb/viewtopic.php?f=12&t=14711
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • patch file icon sendchat.patch (620 bytes) 2008-04-30 02:11 -
    Index: /spring/rts/Game/Game.cpp
    ===================================================================
    --- /spring/rts/Game/Game.cpp	(revision 5798)
    +++ /spring/rts/Game/Game.cpp	(working copy)
    @@ -4196,7 +4196,6 @@
     	if (msg.fromPlayer < 0 || (msg.fromPlayer >= MAX_PLAYERS && msg.fromPlayer != SERVER_PLAYER))
     		return;
     
    -	globalAI->GotChatMsg(msg.msg.c_str(), msg.fromPlayer);
     	CScriptHandler::Instance().chosenScript->GotChatMsg(msg.msg, msg.fromPlayer);
     	string s = msg.msg;
     
    @@ -4248,6 +4247,8 @@
     			sound->PlaySample(chatSound, 5);
     		}
     	}
    +	
    +	globalAI->GotChatMsg(msg.msg.c_str(), msg.fromPlayer);
     }
     
     
    
    
    patch file icon sendchat.patch (620 bytes) 2008-04-30 02:11 +

-Relationships
+Relationships

-Notes

~0002187

Kloot (developer)

committed, but AI's should always appear like oracle machines if you ask me ;)
+Notes

-Issue History
Date Modified Username Field Change
2008-04-30 02:11 zenzike New Issue
2008-04-30 02:11 zenzike File Added: sendchat.patch
2008-04-30 02:58 Kloot Note Added: 0002187
2008-04-30 02:58 Kloot Status new => resolved
2008-04-30 02:58 Kloot Resolution open => fixed
2008-04-30 02:58 Kloot Assigned To => Kloot
+Issue History