View Issue Details

IDProjectCategoryView StatusLast Update
0000630Spring engineGeneralpublic2007-09-22 16:46
Reporterrusty Assigned Toimbaczek  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Summary0000630: Patch for 2 new transport unload methods
Description
FBI Tags added:
    transportUnloadMethod = <integer>;
    0 - land unload, 1 - flyover drop, 2 - land flood
 
classes modified:
    UnitDefHandler,UnitDef,GroundMoveType, TransportCAI, Unit, transportUnit

known bugs: land transports using the land flood method, always unload to the same spot rather than spreading the units out, this is minor and still provides a faster means of unloading
TagsNo tags attached.
Attached Files
newTransportMethods 0.17.diff (Attachment missing)
newTransportMethods 0.18.diff (Attachment missing)
newTransportMethods 0.19 .diff (Attachment missing)
newTransportMethods 0.20 .diff (Attachment missing)
newTransportMethods 0.21 .diff (Attachment missing)
newTransportMethods 0.22 .diff (Attachment missing)
Checked infolog.txt for Errors

Activities

Argh

2007-09-12 01:55

reporter   ~0001250

Please commit, I'd like to test and evaluate these methods.

rusty

2007-09-12 23:05

reporter   ~0001254

Additional information I forgot to mention:

Para-dropped units call the cob scripts 'falling' and 'landed' so that you may start and stop a falling animation.

KDR_11k

2007-09-13 12:55

reporter   ~0001255

Argh, compile a custom build.

imbaczek

2007-09-14 12:01

reporter   ~0001256

the patch has some broken whitespace, please fix that. also, it doesn't export new attributes to Lua, which may be a problem.

rusty

2007-09-14 21:38

reporter   ~0001258

Admittedly, this patch only has the core functionality implemented - to show what is being done. There are afew other minor aesthetics and tags I need to add - such as the drop speed of the transported units and preventing units being occasionally bunched up together when being air dropped.

I'll look into adding lua properties.

KDR_11k

2007-09-15 11:30

reporter   ~0001259

Aren't new attributes always available to Lua in the SVN because they're read by the Lua parser?

imbaczek

2007-09-15 13:38

reporter   ~0001261

I don't know TBH. Better to be on the safe side until trepan confirms/denies.

rusty

2007-09-16 17:58

reporter   ~0001264

Last edited: 2007-09-16 17:58

[new transport methods patch v 0.18]
    
Added tags:
transportUnloadMethod = <integer>;
    0 - land unload, 1 - flyover drop, 2 - land flood

fallSpeed = <float>
unitFallSpeed = <float>

These dictate the speed of units being dropped from the transport.
fallSpeed is used on the transports fbi file, to dictate the speed of all units it drops, unitFallSpeed is used on each transported unit to override fallSpeed.

Transport AI now calls the cob function:
'StartUnload'
which is called once when transport starts to lower during land flood method.

Dropped units call the cob functions:
'falling' and 'landed' so that you may start and stop a parachute animation.
                    

Added lua properties for transportUnloadMethod, fallSpeed, and unitFallSpeed.

imbaczek

2007-09-16 18:13

reporter   ~0001265

there still are is some whitespace stuff, e.g. look at this hunk:

Index: Sim/MoveTypes/groundmovetype.cpp
===================================================================
--- Sim/MoveTypes/groundmovetype.cpp (revision 4358)
+++ Sim/MoveTypes/groundmovetype.cpp (working copy)
@@ -129,8 +129,10 @@
     deltaSpeed(0),
     deltaHeading(0),
     skidding(false),
- flying(false),
+ flying(false),

the only difference is that in your patch there's some trailing whitespace. there's more of that.

also, in general, be conservative in changing whitespace like that:

- ADD_INT( "transportCapacity", ud.transportCapacity);
- ADD_INT( "transportSize", ud.transportSize);
- ADD_FLOAT("transportMass", ud.transportMass);
- ADD_FLOAT("loadingRadius", ud.loadingRadius);
- ADD_BOOL( "isAirBase", ud.isAirBase);
- ADD_BOOL( "isFirePlatform", ud.isfireplatform);
- ADD_BOOL( "holdSteady", ud.holdSteady);
- ADD_BOOL( "releaseHeld", ud.releaseHeld);
- ADD_BOOL( "transportByEnemy", ud.transportByEnemy);
+ ADD_INT( "transportCapacity", ud.transportCapacity);
+ ADD_INT( "transportSize", ud.transportSize);
+ ADD_FLOAT("transportMass", ud.transportMass);
+ ADD_FLOAT("loadingRadius", ud.loadingRadius);
+ ADD_BOOL( "isAirBase", ud.isAirBase);
+ ADD_BOOL( "isFirePlatform", ud.isfireplatform);
+ ADD_BOOL( "holdSteady", ud.holdSteady);
+ ADD_BOOL( "releaseHeld", ud.releaseHeld);
+ ADD_BOOL( "transportByEnemy", ud.transportByEnemy);

it was perfectly fine as it was, makes the patch bloated and doesn't do anything useful.

yes, I'm picky ^_^

there are some legitimate whitespace changes, too, e.g.

@@ -549,7 +566,7 @@
     }
 
     owner->frontdir = GetVectorFromHeading(heading);
- if(owner->upright){
+ if(owner->upright) {

but in general, it makes the patch harder to review.

rusty

2007-09-16 23:04

reporter   ~0001268

Removed all the white space, and generally tidied things up.
Good to go?

imbaczek

2007-09-17 02:45

reporter   ~0001269

almost good. you didn't add CR_MEMBER declarations for new unit, cai and movetype members, this will break savegames and possibly some other stuff.

other than that, it looks good. when you add the missing cr_members, I think I'll commit that so the modders can play around with this a bit.

rusty

2007-09-17 22:29

reporter   ~0001271

CR_MEMBER declarations added for all public variables.

imbaczek

2007-09-18 02:14

reporter   ~0001272

I'm not sure if public is enough. Private stuff needs to be serialized, too.

rusty

2007-09-22 15:20

reporter   ~0001285

Last edited: 2007-09-22 15:28

CR_MEMBER declarations added for All members, and jitter seen on flying/falling ground units has been resolved.

imbaczek

2007-09-22 16:45

reporter   ~0001287

committed in r4424, thanks.

modders, please test.

Issue History

Date Modified Username Field Change
2007-09-11 23:56 rusty New Issue
2007-09-11 23:56 rusty File Added: newTransportMethods 0.17.diff
2007-09-12 01:55 Argh Note Added: 0001250
2007-09-12 23:05 rusty Note Added: 0001254
2007-09-13 12:55 KDR_11k Note Added: 0001255
2007-09-14 12:01 imbaczek Note Added: 0001256
2007-09-14 21:38 rusty Note Added: 0001258
2007-09-15 11:30 KDR_11k Note Added: 0001259
2007-09-15 13:38 imbaczek Note Added: 0001261
2007-09-16 17:49 rusty File Added: newTransportMethods 0.18.diff
2007-09-16 17:58 rusty Note Added: 0001264
2007-09-16 17:58 rusty Note Edited: 0001264
2007-09-16 18:13 imbaczek Note Added: 0001265
2007-09-16 23:03 rusty File Added: newTransportMethods 0.19 .diff
2007-09-16 23:04 rusty Note Added: 0001268
2007-09-17 02:45 imbaczek Note Added: 0001269
2007-09-17 22:29 rusty File Added: newTransportMethods 0.20 .diff
2007-09-17 22:29 rusty Note Added: 0001271
2007-09-18 02:14 imbaczek Note Added: 0001272
2007-09-22 15:18 rusty File Added: newTransportMethods 0.21 .diff
2007-09-22 15:20 rusty Note Added: 0001285
2007-09-22 15:27 rusty File Added: newTransportMethods 0.22 .diff
2007-09-22 15:28 rusty Note Edited: 0001285
2007-09-22 16:45 imbaczek Note Added: 0001287
2007-09-22 16:46 imbaczek Status new => resolved
2007-09-22 16:46 imbaczek Resolution open => fixed
2007-09-22 16:46 imbaczek Assigned To => imbaczek