diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index c86e03aa..f02e3584 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -1954,51 +1954,36 @@ void entityclass::createentity( float xp, float yp, int t, float vx /*= 0*/, flo entity.size = 13; break; - case 51: //Vertical Warp Line - entity.rule = 5; - entity.type = 51; - entity.size = 6; - entity.life = 0; - entity.w = 1; - entity.h = vx; - //entity.colour = 0; + /* Warp lines */ + case 51: /* Vertical */ + case 52: /* Vertical */ + case 53: /* Horizontal */ + case 54: /* Horizontal */ + entity.type = t; entity.onentity = 1; - entity.invis=true; - if (map.custommode) customwarpmode = true; - break; - case 52: //Vertical Warp Line - entity.rule = 5; - entity.type = 52; - entity.size = 6; + entity.invis = true; entity.life = 0; - entity.w = 1; - entity.h = vx; - //entity.colour = 0; - entity.onentity = 1; - entity.invis=true; - if (map.custommode) customwarpmode = true; - break; - case 53: //Horizontal Warp Line - entity.rule = 7; - entity.type = 53; - entity.size = 5; - entity.life = 0; - entity.w = vx; - entity.h = 1; - entity.onentity = 1; - entity.invis=true; - if (map.custommode) customwarpmode = true; - break; - case 54: //Horizontal Warp Line - entity.rule = 7; - entity.type = 54; - entity.size = 5; - entity.life = 0; - entity.w = vx; - entity.h = 1; - entity.onentity = 1; - entity.invis=true; - if (map.custommode) customwarpmode = true; + switch (t) + { + case 51: + case 52: + entity.rule = 5; + entity.size = 6; + entity.w = 1; + entity.h = vx; + break; + case 53: + case 54: + entity.rule = 7; + entity.size = 5; + entity.w = vx; + entity.h = 1; + break; + } + if (map.custommode) + { + customwarpmode = true; + } break; case 55: // Crew Member (custom, collectable) //1 - position in array