2025-07-18 09:02 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000505Spring engineGeneralpublic2007-04-05 00:03
ReporterFLOZi 
Assigned Totvo 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000505: [patch] LoadingRadius tag for transports
DescriptionA simple 1 line patch - this was previously hardcoded to 220 for no apparant reason other than its a good default.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • diff file icon LoadingRadiusTag.diff (708 bytes) 2007-03-30 02:13 -
    Index: UnitDefHandler.cpp
    ===================================================================
    --- UnitDefHandler.cpp	(revision 3508)
    +++ UnitDefHandler.cpp	(working copy)
    @@ -391,7 +391,7 @@
     	tdfparser.GetDef(ud.transportCapacity, "0", "UNITINFO\\transportcapacity");
     	ud.isfireplatform=!!atoi(tdfparser.SGetValueDef("0", "UNITINFO\\isfireplatform").c_str());
     	ud.isAirBase=!!atoi(tdfparser.SGetValueDef("0", "UNITINFO\\isAirBase").c_str());
    -	ud.loadingRadius=220;
    +	ud.loadingRadius=!!atoi(tdfparser.SGetValueDef("220", "UNITINFO\\loadingradius").c_str());
     	tdfparser.GetDef(ud.transportMass, "100000", "UNITINFO\\TransportMass");
     	tdfparser.GetDef(ud.holdSteady, "1", "UNITINFO\\HoldSteady");
     
    
    diff file icon LoadingRadiusTag.diff (708 bytes) 2007-03-30 02:13 +

-Relationships
+Relationships

-Notes

~0000868

tvo (reporter)

Committed, r3547

~0000870

tvo (reporter)

* Fix 2 bugs in the one (!) liner patch r3547:
  - loadingradius was float, so use atof not atoi
  - !! is a shortcut for a cast to boolean, so don't use it for floats

Better doublecheck things a bit more next time :-)

And note to self: don't commit patches when too tired to spot such bugs ;-)
+Notes

-Issue History
Date Modified Username Field Change
2007-03-30 02:13 FLOZi New Issue
2007-03-30 02:13 FLOZi File Added: LoadingRadiusTag.diff
2007-04-04 23:30 tvo Status new => assigned
2007-04-04 23:30 tvo Assigned To => tvo
2007-04-04 23:30 tvo Status assigned => resolved
2007-04-04 23:30 tvo Resolution open => fixed
2007-04-04 23:30 tvo Note Added: 0000868
2007-04-05 00:03 tvo Note Added: 0000870
+Issue History