2019-12-09 11:08 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000953Spring engineGeneralpublic2008-06-13 14:10
Reporterzenzike 
Assigned ToAuswaschbar 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version0.76b1+svn 
Summary0000953: [patch] Minor changes to start script
DescriptionThe commanderscript2 was wasting cycles by checking a switch on each update, when all it needed was for things to be initialized with GameStart.
Additional InformationPatch included.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • txt file icon patch.txt (1,333 bytes) 2008-06-13 12:59 -
    Index: /spring/rts/Game/StartScripts/CommanderScript2.cpp
    ===================================================================
    --- /spring/rts/Game/StartScripts/CommanderScript2.cpp	(revision 6026)
    +++ /spring/rts/Game/StartScripts/CommanderScript2.cpp	(working copy)
    @@ -23,10 +23,8 @@
     }
     
     
    -void CCommanderScript2::Update(void)
    +void CCommanderScript2::GameStart(void)
     {
    -	switch(gs->frameNum){
    -	case 0:
     		gs->Team(0)->energy=1000;
     		gs->Team(0)->energyIncome=1000;	//for the endgame statistics
     		gs->Team(0)->energyStorage=1000;
    @@ -33,7 +31,7 @@
     		gs->Team(0)->metal=1000;
     		gs->Team(0)->metalIncome=1000;
     		gs->Team(0)->metalStorage=1000;
    -
    + 
     		gs->Team(1)->energy=1000;
     		gs->Team(1)->energyIncome=1000;
     		gs->Team(1)->energyStorage=1000;
    @@ -70,8 +68,5 @@
     
     //		unitLoader.LoadUnit("armsam",float3(2650,10,2600),0,false);
     //		unitLoader.LoadUnit("armflash",float3(2450,10,2600),1,false);
    -
    -		break;
    -	}
     }
     
    Index: /spring/rts/Game/StartScripts/CommanderScript2.h
    ===================================================================
    --- /spring/rts/Game/StartScripts/CommanderScript2.h	(revision 6026)
    +++ /spring/rts/Game/StartScripts/CommanderScript2.h	(working copy)
    @@ -9,7 +9,7 @@
     public:
     	CCommanderScript2(void);
     	virtual ~CCommanderScript2(void);
    -	void Update(void);
    +	void GameStart(void);
     };
     
     
    
    txt file icon patch.txt (1,333 bytes) 2008-06-13 12:59 +

-Relationships
+Relationships

-Notes

~0002334

Auswaschbar (reporter)

Fixed, thanks for the report.
+Notes

-Issue History
Date Modified Username Field Change
2008-06-13 12:59 zenzike New Issue
2008-06-13 12:59 zenzike File Added: patch.txt
2008-06-13 14:10 Auswaschbar Status new => resolved
2008-06-13 14:10 Auswaschbar Fixed in Version => 0.76b1+svn
2008-06-13 14:10 Auswaschbar Resolution open => fixed
2008-06-13 14:10 Auswaschbar Assigned To => Auswaschbar
2008-06-13 14:10 Auswaschbar Note Added: 0002334
+Issue History