Switched out our kinda juryrigged vector types for glm::vec types since we use that as a 3d math library already but never switched out the types

This commit is contained in:
KimLS
2015-01-23 00:01:10 -08:00
parent 03286f540a
commit 269d56e1d0
68 changed files with 1524 additions and 1692 deletions
+12 -12
View File
@@ -219,7 +219,7 @@ XS(XS__spawn)
int npc_type = (int)SvIV(ST(0));
int grid = (int)SvIV(ST(1));
int unused = (int)SvIV(ST(2));
auto position = xyz_heading((float)SvNV(ST(3)), (float)SvNV(ST(4)), (float)SvNV(ST(5)), 0.0f);
auto position = glm::vec4((float)SvNV(ST(3)), (float)SvNV(ST(4)), (float)SvNV(ST(5)), 0.0f);
Mob *r = quest_manager.spawn2(npc_type, grid, unused, position);
RETVAL = (r != nullptr) ? r->GetID() : 0;
@@ -241,7 +241,7 @@ XS(XS__spawn2)
int npc_type = (int)SvIV(ST(0));
int grid = (int)SvIV(ST(1));
int unused = (int)SvIV(ST(2));
auto position = xyz_heading((float)SvNV(ST(3)), (float)SvNV(ST(4)), (float)SvNV(ST(5)), (float)SvNV(ST(6)));
auto position = glm::vec4((float)SvNV(ST(3)), (float)SvNV(ST(4)), (float)SvNV(ST(5)), (float)SvNV(ST(6)));
Mob *r = quest_manager.spawn2(npc_type, grid, unused, position);
RETVAL = (r != nullptr) ? r->GetID() : 0;
@@ -270,7 +270,7 @@ XS(XS__unique_spawn)
if(items == 7)
heading = (float)SvNV(ST(6));
Mob *r = quest_manager.unique_spawn(npc_type, grid, unused, xyz_heading(x, y, z, heading));
Mob *r = quest_manager.unique_spawn(npc_type, grid, unused, glm::vec4(x, y, z, heading));
RETVAL = (r != nullptr) ? r->GetID() : 0;
XSprePUSH; PUSHu((UV)RETVAL);
@@ -1317,7 +1317,7 @@ XS(XS__rebind)
Perl_croak(aTHX_ "Usage: rebind(zoneid, x, y, z)");
int zoneid = (int)SvIV(ST(0));
auto location = xyz_location((float)SvNV(ST(1)),(float)SvNV(ST(2)),(float)SvNV(ST(3)));
auto location = glm::vec3((float)SvNV(ST(1)),(float)SvNV(ST(2)),(float)SvNV(ST(3)));
quest_manager.rebind(zoneid, location);
@@ -1388,7 +1388,7 @@ XS(XS__moveto)
else
saveguard = false;
quest_manager.moveto(xyz_heading(x, y, z, h), saveguard);
quest_manager.moveto(glm::vec4(x, y, z, h), saveguard);
XSRETURN_EMPTY;
}
@@ -1743,7 +1743,7 @@ XS(XS__summonburriedplayercorpse)
bool RETVAL;
uint32 char_id = (int)SvIV(ST(0));
auto position = xyz_heading((float)SvIV(ST(1)), (float)SvIV(ST(2)), (float)SvIV(ST(3)),(float)SvIV(ST(4)));
auto position = glm::vec4((float)SvIV(ST(1)), (float)SvIV(ST(2)), (float)SvIV(ST(3)),(float)SvIV(ST(4)));
RETVAL = quest_manager.summonburriedplayercorpse(char_id, position);
@@ -1761,7 +1761,7 @@ XS(XS__summonallplayercorpses)
bool RETVAL;
uint32 char_id = (int)SvIV(ST(0));
auto position = xyz_heading((float)SvIV(ST(1)),(float)SvIV(ST(2)),(float)SvIV(ST(3)),(float)SvIV(ST(4)));
auto position = glm::vec4((float)SvIV(ST(1)),(float)SvIV(ST(2)),(float)SvIV(ST(3)),(float)SvIV(ST(4)));
RETVAL = quest_manager.summonallplayercorpses(char_id, position);
@@ -2660,10 +2660,10 @@ XS(XS__CreateGroundObject)
uint16 id = 0;
if(items == 5)
id = quest_manager.CreateGroundObject(itemid, xyz_heading(x, y, z, heading));
id = quest_manager.CreateGroundObject(itemid, glm::vec4(x, y, z, heading));
else{
uint32 decay_time = (uint32)SvIV(ST(5));
id = quest_manager.CreateGroundObject(itemid, xyz_heading(x, y, z, heading), decay_time);
id = quest_manager.CreateGroundObject(itemid, glm::vec4(x, y, z, heading), decay_time);
}
XSRETURN_IV(id);
@@ -2691,7 +2691,7 @@ XS(XS__CreateGroundObjectFromModel)
if (items > 6)
decay_time = (uint32)SvIV(ST(6));
id = quest_manager.CreateGroundObjectFromModel(modelname, xyz_heading(x, y, z, heading), type, decay_time);
id = quest_manager.CreateGroundObjectFromModel(modelname, glm::vec4(x, y, z, heading), type, decay_time);
XSRETURN_IV(id);
}
@@ -2966,12 +2966,12 @@ XS(XS__MovePCInstance)
if (items == 4)
{
quest_manager.MovePCInstance(zoneid, instanceid, xyz_heading(x, y, z, 0.0f));
quest_manager.MovePCInstance(zoneid, instanceid, glm::vec4(x, y, z, 0.0f));
}
else
{
float heading = (float)SvNV(ST(5));
quest_manager.MovePCInstance(zoneid, instanceid, xyz_heading(x, y, z, heading));
quest_manager.MovePCInstance(zoneid, instanceid, glm::vec4(x, y, z, heading));
}
XSRETURN_EMPTY;