mapmodel stdedit fixes

master
Lee Salzman 2013-05-15 20:07:35 +03:00
parent 1a21d747cf
commit 4ca29d1278
3 changed files with 12 additions and 9 deletions

View File

@ -1266,7 +1266,7 @@ newentgui spotlight "radius" "0 200"
newentgui playerstart "direction" "0 360"
newentgui teleport "tag" "0 20"
newentgui teledest "direction tag" "0 360 0 20"
newentgui mapmodel "direction model" "0 360 0 100"
newentgui mapmodel "model direction" "0 100 0 360"
newentgui envmap "radius" "0 400"
newentgui jumppad "Z Y X" "0 200 0 200 0 200"
newentgui sound "type radius size" "0 20 0 500 0 500"

View File

@ -68,7 +68,7 @@ enttypeselect = [
ent_action_base = [ entproperty 0 ( * $arg1 1 ) ]
ent_action_teleport = [ entproperty 0 ( * $arg1 1 ) ]
ent_action_teledest = [ entproperty 1 ( * $arg1 1 ) ]
ent_action_mapmodel = [ entproperty 1 ( * $arg1 1 ) ]
ent_action_mapmodel = [ entproperty 0 ( * $arg1 1 ) ]
ent_action_spotlight = [ entproperty 0 ( * $arg1 5 ) ]
ent_action_light = [ entproperty 0 ( * $arg1 5 ) ]
ent_action_jumppad = [ entproperty 0 ( * $arg1 5 ) ]
@ -215,17 +215,20 @@ editfacewentpush = [
]
]
entswithdirection = "playerstart teledest mapmodel"
entswithdirection = [playerstart teledest mapmodel]
entdirectionprop = [0 0 1]
entdirection = [
if ( && [enthavesel] [ = (havesel) 0 ] ) [
if (>= (indexof $entswithdirection (enttype)) 0) [
entdiridx = (indexof $entswithdirection (enttype))
if (>= $entdiridx 0) [
entdirprop = (at $entdirectionprop $entdiridx)
if (> $arg1 0) [
entproperty 0 $arg2
if (> (entattr 0) 360) [ entproperty 0 -360 ]
entproperty $entdirprop $arg2
if (> (entattr $entdirprop) 360) [ entproperty $entdirprop -360 ]
] [
entproperty 0 (- 0 $arg2)
if (< (entattr 0) 0) [ entproperty 0 360 ]
entproperty $entdirprop (- 0 $arg2)
if (< (entattr $entdirprop) 0) [ entproperty $entdirprop 360 ]
]
]
result 1

View File

@ -905,7 +905,7 @@ extentity *newentity(bool local, const vec &o, int type, int v1, int v2, int v3,
switch(type)
{
case ET_MAPMODEL:
e.attr2 = (int)camera1->yaw;
if(!e.attr2) e.attr2 = (int)camera1->yaw;
break;
case ET_PLAYERSTART:
e.attr5 = e.attr4;