Ok, another bug I think (MissionMarker)
by Vince Gee · in Torque 3D Professional · 04/16/2013 (6:54 am) · 3 replies
So, I'm working through the code and I'm a bit confused in missionMarker.h and missionMarker.cpp
So, I'm confused, how can you set the team property? Since WayPointTeam is not based off of SimObject, you can't use it's ID. And if you set the team property to say 3 how does the engine know what your talking about? Is it SimObjectID 3 or "3"? Or are you setting the pointer object to some abstract int?
How can you create a new WayPointTeam (i.e. a waypointteam id and waypoint marker) object from torquescript to assign it to a waypoint as the team? I guess you could just set the id but then wouldn't that get ugly as well since there would be no way to find the waypointteam marker via the Sim::FindObject?
Well, Mr. FIXME... It should not work... you suck.
If you really wanted this functionality, why wouldn't you just make it a dynamic member variable and just use the number like how it appears to be implemented? Why go through all the entra hoops?
addField("team", TypeWayPointTeam, Offset(mTeam, WayPoint), "Unique numerical ID assigned to this waypoint, or set of waypoints");class WayPointTeam
{
public:
WayPointTeam();
S32 mTeamId;
WayPoint * mWayPoint;
};
DECLARE_STRUCT( WayPointTeam );
DefineConsoleType( TypeWayPointTeam, WayPointTeam * );
WayPointTeam::WayPointTeam()
{
mTeamId = 0;
mWayPoint = 0;
}So, I'm confused, how can you set the team property? Since WayPointTeam is not based off of SimObject, you can't use it's ID. And if you set the team property to say 3 how does the engine know what your talking about? Is it SimObjectID 3 or "3"? Or are you setting the pointer object to some abstract int?
How can you create a new WayPointTeam (i.e. a waypointteam id and waypoint marker) object from torquescript to assign it to a waypoint as the team? I guess you could just set the id but then wouldn't that get ugly as well since there would be no way to find the waypointteam marker via the Sim::FindObject?
//FIXME: this should work but does not; need to check the stripping down to base types within TYPE //ConsoleType( WayPointTeam, TypeWayPointTeam, WayPointTeam* ) ConsoleType( WayPointTeam, TypeWayPointTeam, WayPointTeam )
Well, Mr. FIXME... It should not work... you suck.
If you really wanted this functionality, why wouldn't you just make it a dynamic member variable and just use the number like how it appears to be implemented? Why go through all the entra hoops?
About the author
www.winterleafentertainment.com
#2
04/16/2013 (7:49 am)
bool WayPoint::onAdd()
{
if(!Parent::onAdd())
return(false);
//
if(isClientObject())
Sim::getWayPointSet()->addObject(this);
else
{
mTeam.mWayPoint = this;
setMaskBits(UpdateNameMask|UpdateTeamMask);
}
return(true);
}Mr. FIXME thinking..... "hmm, since I really screwed the pooch on this, I'll just make the team = this... yea that'll fix it."
#3
Probably a candidate for removal or at least an overhaul to make it work.
04/16/2013 (8:02 am)
It looks like old, broken Tribes 2-era code to me. It probably had additional functionality at some point that made it work in T2 but was gutted for the v12/Torque release. Probably a candidate for removal or at least an overhaul to make it work.
Torque Owner Vince Gee
WinterLeaf Entertainment