Hi mace.
About your Windsock mod....
When you add self canceling code for its own rotating , the Stationary Object becomes free setting not to force its direction to the North by players' hands.
In my code written in December/2014 , the direction of the Windsock object set is recorded in the value of poleYaw and the value is used to calculate how windsock rotating regarding the wind, its own set direction is canceled and players' don't have to set it to the North.
private WindsockGeneric(WindsockProperties windsockproperties, ActorSpawnArg actorspawnarg)
{
super(windsockproperties.meshName);
prop = null;
outCommand = new NetMsgFiltered();
prop = windsockproperties;
....
Align();
Loc loc = new Loc();
loc = this.pos.getAbs();
poleYaw = -loc.getOrient().getYaw();
for(; poleYaw >= 360F; poleYaw -= 360) ;
for(; poleYaw < 0F; poleYaw += 360) ;
startMove();
....
}
class Move extends Interpolate
{
public boolean tick()
{
....
double angle = 0.0D;
if(windV > 0.01F)
{
Orient oTemp = new Orient();
vectorWind.normalize();
oTemp.setAT0(vectorWind);
angle = oTemp.getAzimut() - 90F;
}
float new_deg_rot = -(float) angle + poleYaw;
for( ; new_deg_rot >= 360F; new_deg_rot -= 360F) ;
for( ; new_deg_rot < 0F; new_deg_rot += 360F) ;
float div = (float) Math.floor(25F - windV);
new_deg_rot += World.Rnd().nextFloat(-0.5F * windV - 0.5F, 0.5F * windV + 0.5F);
deg_rot = ((div - 1F) * deg_rot + new_deg_rot) / div;
float new_deg_up = Aircraft.cvt(windV, 0F, 11F, 0F, 92F);
new_deg_up += World.Rnd().nextFloat(-0.5F * windV - 0.5F, 0.5F * windV + 0.5F);
deg_up = ((div - 1F) * deg_up + new_deg_up) / div;
hierMesh().chunkSetAngles("Root", deg_rot, 0.0F, 0.0F);
hierMesh().chunkSetAngles("Windsock", 0.0F, 0.0F, deg_up);
return true;
}
....
}