From: Daniel H. <hel...@us...> - 2004-06-30 06:58:59
|
Update of /cvsroot/vegastrike/vegastrike/src/cmd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18799/cmd Modified Files: unit_csv.cpp Log Message: got everythin committed Index: unit_csv.cpp =================================================================== RCS file: /cvsroot/vegastrike/vegastrike/src/cmd/unit_csv.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** unit_csv.cpp 30 Jun 2004 06:24:45 -0000 1.13 --- unit_csv.cpp 30 Jun 2004 06:58:48 -0000 1.14 *************** *** 151,160 **** double xyscale = stof(nextElement(mount)); double zscale = stof(nextElement(mount)); - Q.i = stof(nextElement(mount)); - Q.j = stof(nextElement(mount),1); - Q.k = stof(nextElement(mount)); R.i = stof(nextElement(mount)); R.j = stof(nextElement(mount)); R.k = stof(nextElement(mount),1); float func =stof(nextElement(mount),1); float maxfunc =stof(nextElement(mount),1); --- 151,160 ---- double xyscale = stof(nextElement(mount)); double zscale = stof(nextElement(mount)); R.i = stof(nextElement(mount)); R.j = stof(nextElement(mount)); R.k = stof(nextElement(mount),1); + Q.i = stof(nextElement(mount)); + Q.j = stof(nextElement(mount),1); + Q.k = stof(nextElement(mount)); float func =stof(nextElement(mount),1); float maxfunc =stof(nextElement(mount),1); *************** *** 175,179 **** xml.mountz.push_back(createMount (filename.c_str(), ammo,volume,xyscale,zscale,func,maxfunc)); xml.mountz[indx]->SetMountOrientation(Quaternion::from_vectors(P.Cast(),Q.Cast(),R.Cast())); ! xml.mountz[indx]->SetMountPosition(pos.Cast()); int mntsiz=weapon_info::NOWEAP; if (mountsize.length()) { --- 175,179 ---- xml.mountz.push_back(createMount (filename.c_str(), ammo,volume,xyscale,zscale,func,maxfunc)); xml.mountz[indx]->SetMountOrientation(Quaternion::from_vectors(P.Cast(),Q.Cast(),R.Cast())); ! xml.mountz[indx]->SetMountPosition(xml.unitscale*pos.Cast()); int mntsiz=weapon_info::NOWEAP; if (mountsize.length()) { *************** *** 246,250 **** Q.k=stof(nextElement(subunit)); double restricted=cos(stof(nextElement(subunit),-1)*180./VS_PI); ! ret.push_back(SubUnitStruct(filename,pos,R,Q,restricted)); } } --- 246,250 ---- Q.k=stof(nextElement(subunit)); double restricted=cos(stof(nextElement(subunit),-1)*180./VS_PI); ! ret.push_back(SubUnitStruct(filename,pos,Q,R,restricted)); } } *************** *** 270,274 **** R.Normalize(); xml.units.back()->prev_physical_state = xml.units.back()->curr_physical_state; ! xml.units.back()->SetPosition(pos); // xml.units.back()->prev_physical_state= Transformation(Quaternion::from_vectors(P,Q,R),pos); // xml.units.back()->curr_physical_state=xml.units.back()->prev_physical_state; --- 270,274 ---- R.Normalize(); xml.units.back()->prev_physical_state = xml.units.back()->curr_physical_state; ! xml.units.back()->SetPosition(pos*xml.unitscale); // xml.units.back()->prev_physical_state= Transformation(Quaternion::from_vectors(P,Q,R),pos); // xml.units.back()->curr_physical_state=xml.units.back()->prev_physical_state; *************** *** 286,290 **** } ! void AddDocks (Unit* thus, string docks) { string::size_type where; while ((where=docks.find("{"))!=string::npos) { --- 286,290 ---- } ! void AddDocks (Unit* thus, Unit::XML &xml, string docks) { string::size_type where; while ((where=docks.find("{"))!=string::npos) { *************** *** 301,305 **** double size=stof(nextElement(dock)); double minsize=stof(nextElement(dock)); ! thus->image->dockingports.push_back (DockingPorts(pos.Cast(),size,minsize,internal)); } } --- 301,305 ---- double size=stof(nextElement(dock)); double minsize=stof(nextElement(dock)); ! thus->image->dockingports.push_back (DockingPorts(pos.Cast()*xml.unitscale,size,minsize,internal)); } } *************** *** 326,330 **** halocolor.a=stof(nextElement(light),1); double act_speed=stof(nextElement(light)); ! thus->addHalo(filename.c_str(),pos,scale.Cast(),halocolor,"",act_speed); } } --- 326,330 ---- halocolor.a=stof(nextElement(light),1); double act_speed=stof(nextElement(light)); ! thus->addHalo(filename.c_str(),pos*xml.unitscale,scale.Cast(),halocolor,"",act_speed); } } *************** *** 464,467 **** --- 464,468 ---- image->unitscale=xml.unitscale; AddMeshes(xml,row["Mesh"],faction,getFlightgroup()); + AddDocks(this,xml,row["Dock"]); AddSubUnits(this,xml,row["Sub_Units"],faction); meshdata= xml.meshes; *************** *** 816,825 **** (double)mounts[j].xyscale, (double)mounts[j].zscale, - (double)m.getQ().i, - (double)m.getQ().j, - (double)m.getQ().k, (double)m.getR().i, (double)m.getR().j, (double)m.getR().k, (double)mounts[j].functionality, (double)mounts[j].maxfunctionality --- 817,826 ---- (double)mounts[j].xyscale, (double)mounts[j].zscale, (double)m.getR().i, (double)m.getR().j, (double)m.getR().k, + (double)m.getQ().i, + (double)m.getQ().j, + (double)m.getQ().k, (double)mounts[j].functionality, (double)mounts[j].maxfunctionality |