From: Côme Chilliet Date: Wed, 14 Dec 2016 16:32:19 +0000 (+0700) Subject: Deleted duplicated unused method X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=b9dfb15156a7af6710511b5dee1b272173946d2d;hp=1f7114ce6178de7231a890c31535acbbc34b3c6b;p=lugaru.git Deleted duplicated unused method --- diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 3b47a60..34b22e0 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -2038,7 +2038,6 @@ void doDevKeys() scenecoords.y = Person::players[0]->coords.y - .5; if (editortype == firetype) scenecoords.y = Person::players[0]->coords.y - .5; - //objects.MakeObject(abs(Random()%3),scenecoords,Random()%360); float temprotat, temprotat2; temprotat = editoryaw; temprotat2 = editorpitch; diff --git a/Source/Objects/Objects.cpp b/Source/Objects/Objects.cpp index 3877b9e..c123342 100644 --- a/Source/Objects/Objects.cpp +++ b/Source/Objects/Objects.cpp @@ -523,95 +523,6 @@ void Objects::DeleteObject(int which) numobjects--; } -void Objects::MakeObject(int atype, XYZ where, float ayaw, float ascale) -{ - if ((atype != treeleavestype && atype != bushtype) || foliage == 1) { - scale[numobjects] = ascale; - if (atype == treeleavestype) - scale[numobjects] += fabs((float)(Random() % 100) / 900) * ascale; - - onfire[numobjects] = 0; - flamedelay[numobjects] = 0; - type[numobjects] = atype; - - if (atype == firetype) - onfire[numobjects] = 1; - - position[numobjects] = where; - if (atype == bushtype) - position[numobjects].y = terrain.getHeight(position[numobjects].x, position[numobjects].z) - .3; - yaw[numobjects] = ayaw; - - rotxvel[numobjects] = 0; - rotyvel[numobjects] = 0; - rotx[numobjects] = 0; - roty[numobjects] = 0; - - if (atype == boxtype) model[numobjects].loaddecal("Models/Box.solid", 0); - if (atype == cooltype) model[numobjects].loaddecal("Models/Cool.solid", 0); - if (atype == walltype) model[numobjects].loaddecal("Models/Wall.solid", 0); - if (atype == tunneltype) model[numobjects].loaddecal("Models/Tunnel.solid", 0); - if (atype == chimneytype) model[numobjects].loaddecal("Models/Chimney.solid", 0); - if (atype == spiketype) model[numobjects].load("Models/Spike.solid", 0); - if (atype == weirdtype) model[numobjects].loaddecal("Models/Weird.solid", 0); - if (atype == rocktype) model[numobjects].loaddecal("Models/Rock.solid", 0); - if (atype == treetrunktype) model[numobjects].load("Models/TreeTrunk.solid", 0); - if (atype == treeleavestype) model[numobjects].load("Models/Leaves.solid", 0); - if (atype == bushtype) model[numobjects].load("Models/Bush.solid", 0); - - if (atype == boxtype) friction[numobjects] = 1.5; - if (atype == cooltype) friction[numobjects] = 1.5; - if (atype == walltype) friction[numobjects] = 1.5; - if (atype == platformtype) friction[numobjects] = 1.5; - if (atype == tunneltype) friction[numobjects] = 1.5; - if (atype == chimneytype) friction[numobjects] = 1.5; - if (atype == rocktype) friction[numobjects] = .5; - if (atype == rocktype && ascale>.5) friction[numobjects] = 1.5; - if (atype == weirdtype) friction[numobjects] = 1.5; - if (atype == spiketype) friction[numobjects] = .4; - if (atype == treetrunktype) friction[numobjects] = .4; - if (atype == treeleavestype) friction[numobjects] = 0; - - if (atype == platformtype) { - model[numobjects].loaddecal("Models/Platform.solid", 0); - model[numobjects].Rotate(90, 0, 0); - } - - if (type[numobjects] == boxtype || type[numobjects] == cooltype || type[numobjects] == spiketype || type[numobjects] == weirdtype || type[numobjects] == walltype || type[numobjects] == chimneytype || type[numobjects] == tunneltype || type[numobjects] == platformtype) { - model[numobjects].ScaleTexCoords(scale[numobjects] * 1.5); - } - if (type[numobjects] == rocktype) { - model[numobjects].ScaleTexCoords(scale[numobjects] * 3); - } - model[numobjects].flat = 1; - if (atype == treetrunktype || atype == treeleavestype || atype == rocktype) { - model[numobjects].flat = 0; - } - model[numobjects].Scale(.3 * scale[numobjects], .3 * scale[numobjects], .3 * scale[numobjects]); - model[numobjects].Rotate(90, 1, 1); - if (type[numobjects] == rocktype) { - model[numobjects].Rotate(ayaw * 5, 1, 1); - } - model[numobjects].CalculateNormals(1); - model[numobjects].ScaleNormals(-1, -1, -1); - - if (detail == 2) { - if (atype == treetrunktype && position[numobjects].y < terrain.getHeight(position[numobjects].x, position[numobjects].z) + 1) { - terrain.MakeDecal(shadowdecalpermanent, position[numobjects], 2, .4, 0); - } - - if (atype == bushtype && position[numobjects].y < terrain.getHeight(position[numobjects].x, position[numobjects].z) + 1) { - terrain.MakeDecal(shadowdecalpermanent, position[numobjects], 1, .4, 0); - } - } - - if (atype != treeleavestype && atype != bushtype && atype != firetype) - terrain.AddObject(where + DoRotation(model[numobjects].boundingspherecenter, 0, ayaw, 0), model[numobjects].boundingsphereradius, numobjects); - - numobjects++; - } -} - void Objects::MakeObject(int atype, XYZ where, float ayaw, float apitch, float ascale) { if ((atype != treeleavestype && atype != bushtype) || foliage == 1) { diff --git a/Source/Objects/Objects.hpp b/Source/Objects/Objects.hpp index 70f382a..40c10bd 100644 --- a/Source/Objects/Objects.hpp +++ b/Source/Objects/Objects.hpp @@ -86,7 +86,6 @@ public: void SphereCheckPossible(XYZ *p1, float radius); void DeleteObject(int which); - void MakeObject(int atype, XYZ where, float ayaw, float ascale); void MakeObject(int atype, XYZ where, float ayaw, float apitch, float ascale); void Draw(); void DoShadows();