Air transport fix.
Moderator: Moderators
You are totally nto gettign what i am saying.
Your fix fixes the problem and opens up a new type of unit to modders.
But it doesnt fix it for old units unless their FBI's changed.
Thus I am not replacing your patch I am ADDING to it. I am not saying that what you did is wrong, I am adding to it so that it doesnt require modder to change the tags as they are already....
btw I've never used teamspeak, I already have enough cotnact details as ti is (msn, yahoo, gtalk,gmail,this forum,darkstars, lobby, aol/aim take your pick)
Your fix fixes the problem and opens up a new type of unit to modders.
But it doesnt fix it for old units unless their FBI's changed.
Thus I am not replacing your patch I am ADDING to it. I am not saying that what you did is wrong, I am adding to it so that it doesnt require modder to change the tags as they are already....
btw I've never used teamspeak, I already have enough cotnact details as ti is (msn, yahoo, gtalk,gmail,this forum,darkstars, lobby, aol/aim take your pick)
the problem si your seeing them as 2 different solutions, they're nto seperate solutions.
Mine is meant to go alongside smoth's replacement, it isnt meant to replace it.
All ti does is prevent existing untis from having to change their TDF's to fix the issue.
It doesnt rpevent you from using smoths tag or changing how smoths tag works.
If smoths tag is not defined and isairbase==1 then it assumes this units TDF was made before the patch smoth made was posted here. So it dynamically assigns smoths tag.
there is nothign stopping you deining both tags and getting transports that have air repair pads, or having any combination e.g.
isAirBase=1;
isfireplatform=1;
or
isAirBase=0;
isfireplatform=1;
or
isAirBase=1;
isfireplatform=0;
What I'm sayign is that if you just define
isAirBase=1;
by itself without the isfireplatform then it assumes the TDF was written before the isfireplatform tag was added, and attempts to fix the problem dynamically.
My change does not affect units that use smoths new tag at all
Mine is meant to go alongside smoth's replacement, it isnt meant to replace it.
All ti does is prevent existing untis from having to change their TDF's to fix the issue.
It doesnt rpevent you from using smoths tag or changing how smoths tag works.
If smoths tag is not defined and isairbase==1 then it assumes this units TDF was made before the patch smoth made was posted here. So it dynamically assigns smoths tag.
there is nothign stopping you deining both tags and getting transports that have air repair pads, or having any combination e.g.
isAirBase=1;
isfireplatform=1;
or
isAirBase=0;
isfireplatform=1;
or
isAirBase=1;
isfireplatform=0;
What I'm sayign is that if you just define
isAirBase=1;
by itself without the isfireplatform then it assumes the TDF was written before the isfireplatform tag was added, and attempts to fix the problem dynamically.
My change does not affect units that use smoths new tag at all
Ok, now i understand what you (AF) meant. I have modified Smoth's patch so it adds isFirePlatform tag but keeps compatibility with isAirBase tag. It also fixes, so planes won't try to land on transports with isAirBase=1 tag anymore.
What do think about it now?
Code: Select all
edit: Patch code was posted here, but version posted 3 posts below is better. :)
Last edited by Rafal99 on 30 Jun 2006, 01:08, edited 1 time in total.
Ok, i have found a way to do the same effect with smaller amount of changes.
Updated patch:

Updated patch:
Code: Select all
Index: D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitDef.h
===================================================================
--- D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitDef.h (revision 1552)
+++ D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitDef.h (working copy)
@@ -172,7 +172,8 @@
float loadingRadius; //for transports
int transportCapacity;
int transportSize;
- bool isAirBase;// should the carried units still be able to shoot?
+ bool isAirBase;
+ bool isFirePlatform; // should the carried units still be able to shoot?
float transportMass;
bool canCloak; //if the unit can cloak
Index: D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitDefHandler.cpp
===================================================================
--- D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitDefHandler.cpp (revision 1552)
+++ D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitDefHandler.cpp (working copy)
@@ -292,6 +292,12 @@
tdfparser.GetDef(ud.transportSize, "0", "UNITINFO\\transportsize");
tdfparser.GetDef(ud.transportCapacity, "0", "UNITINFO\\transportcapacity");
ud.isAirBase=!!atoi(tdfparser.SGetValueDef("0", "UNITINFO\\isAirBase").c_str());
+ ud.isFirePlatform=!!atoi(tdfparser.SGetValueDef("0", "UNITINFO\\isfireplatform").c_str());
+ if (ud.isAirBase && !ud.builder) {
+ ud.isAirBase = false;
+ ud.isFirePlatform = true;
+ }
+
ud.loadingRadius=220;
tdfparser.GetDef(ud.transportMass, "100000", "UNITINFO\\TransportMass");
Index: D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitTypes/TransportUnit.cpp
===================================================================
--- D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitTypes/TransportUnit.cpp (revision 1552)
+++ D:/xxxxx/TA Spring Source/trunk Source/rts/Sim/Units/UnitTypes/TransportUnit.cpp (working copy)
@@ -94,7 +94,7 @@
unit->AddDeathDependence (this);
unit->transporter = this;
unit->toBeTransported=false;
- if (!unitDef->isAirBase)
+ if (!unitDef->isFirePlatform)
unit->stunned=true; //make sure unit doesnt fire etc in transport
unit->UnBlock();
loshandler->FreeInstance(unit->los);
@@ -126,7 +126,7 @@
unit->transporter=0;
if(CTAAirMoveType* am=dynamic_cast<CTAAirMoveType*>(moveType))
unit->moveType->useHeading=true;
- unit->stunned=false; // de-stun in case it isairbase=0
+ unit->stunned=false; // de-stun in case it isfireplatform=0
unit->Block();
loshandler->MoveUnit(unit,false);
unit->moveType->LeaveTransport();
I added to it, yet you all ahd a go at me for replacing your code when infact i was adding to it.
Remember? The bit that dynamically set the value fo your tag if the user didnt define it based on wether it was a buidler or not?
Denying something happened wont make ti go away, it just paints a picture fo you being ignorant.
PS :: Teamspeak.org gives me timedout delayed response emssages
Remember? The bit that dynamically set the value fo your tag if the user didnt define it based on wether it was a buidler or not?
Denying something happened wont make ti go away, it just paints a picture fo you being ignorant.
PS :: Teamspeak.org gives me timedout delayed response emssages
eye for an eye we have all heard that before.AF wrote:because of the reaction you all gave to my addition.
React liek that and you'll get a similar reaction back.
the point is (like caydr said) only like 10 units (in all of spring, i think) need to be changed its not that big of a problem. XTA can be updated with new spring version, i think from his response that Caydr is willing to change his units, uhh, who else... TLL maybe, 1944 isn't out, E&E doesn't use it, im sure there are a few others but really its not going to be that hard.
Last edited by j5mello on 30 Jun 2006, 00:57, edited 1 time in total.
AF wrote:I added to it, yet you all ahd a go at me for replacing your code when infact i was adding to it.
Remember? The bit that dynamically set the value fo your tag if the user didnt define it based on wether it was a buidler or not?
You can call me names or whatever but that doesn't make you right.AF wrote:Denying something happened wont make ti go away, it just paints a picture fo you being ignorant.
By keeping the old unit functionality we still have aircraft landing on transports. Which is bad because the unit will be broken still. We have to change the old code to correct those old units. That was the whole point of the patch.
weirdAF wrote:PS :: Teamspeak.org gives me timedout delayed response emssages
smoth wrote:By keeping the old unit functionality we still have aircraft landing on transports.
Noone reads what i wrote.Rafal99 wrote: I have modified Smoth's patch so it adds isFirePlatform tag but keeps compatibility with isAirBase tag. It also fixes, so planes won't try to land on transports with isAirBase=1 tag anymore.

Yes, i know, butsmoth wrote:isairbase=1 is for planes to land on the platform.
This part of code means that unit with isAirBase=1 but without Builder=1 won't be treated as air repair pad. All current air repair pads have Builder=1 tag, and all transports don't have this tag, so it will all work well.Rafal99 wrote:+ if (ud.isAirBase && !ud.builder) {
+ ud.isAirBase = false;
+ ud.isFirePlatform = true;
+ }
Although if you want to make a transport with builder abilities, which isn't air pad, then you can only use IsFirePlatform=1, not isAirBase=1.