]> git.jsancho.org Git - lugaru.git/commitdiff
Deleted duplicated unused method
authorCôme Chilliet <come@chilliet.eu>
Wed, 14 Dec 2016 16:32:19 +0000 (23:32 +0700)
committerCôme Chilliet <come@chilliet.eu>
Wed, 14 Dec 2016 16:32:19 +0000 (23:32 +0700)
Source/GameTick.cpp
Source/Objects/Objects.cpp
Source/Objects/Objects.hpp

index 3b47a602470a4f399824c5ff306466c70e55e66f..34b22e0df8a88f8df8739e619839afd5620f228c 100644 (file)
@@ -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;
index 3877b9e8e6c29be90ce6d5c668d8902200254ed1..c12334288f4756aed3bcd8043d8f366c4ee81156 100644 (file)
@@ -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) {
index 70f382ac8163b60f10a70c2f2e84df6b37112e37..40c10bdfb9fdb4fc21ad6593cad3b5ed379f759d 100644 (file)
@@ -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();