47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
-
-
+
+
-
-
-
+
+
-
-
+
-
-
+
+
-
+
-
-
+
-
-
-
+
-
-
+
-
+
-
-
-
+
+
-
-
-
+
+
+
-
-
+
|
for (Entity *e in ents) {
if (e.type == MAPMODEL) {
MapModelInfo *mmi = getmminfo(e.attr2);
if (mmi == nil)
continue;
rendermodel(mmi.name, 0, 1, e.attr4, (float)mmi.rad,
OFMakeVector3D(e.x,
(float)S(e.x, e.y)->floor + mmi.zoff + e.attr3,
OFMakeVector3D(e.x, (float)S(e.x, e.y)->floor +
mmi.zoff + e.attr3, e.y), (float)((e.attr1 + 7) -
e.y),
(float)((e.attr1 + 7) - (e.attr1 + 7) % 15), 0,
false, 1.0f, 10.0f, mmi.snap, 0);
(e.attr1 + 7) % 15), 0, false, 1.0f, 10.0f,
mmi.snap, 0);
} else {
if (OUTBORD(e.x, e.y))
continue;
if (e.type != CARROT) {
if (!e.spawned && e.type != TELEPORT)
continue;
if (e.type < I_SHELLS || e.type > TELEPORT)
continue;
renderent(e, entmdlnames[e.type - I_SHELLS],
(float)(1 +
sin(lastmillis / 100.0 + e.x + e.y) /
(float)(1 + sin(lastmillis / 100.0 + e.x +
20),
lastmillis / 10.0f, 0, 1, 0, 10.0f);
e.y) / 20), lastmillis / 10.0f, 0, 1, 0,
10.0f);
} else {
switch (e.attr2) {
case 1:
case 3:
continue;
case 2:
case 0:
if (!e.spawned)
continue;
renderent(e, @"carrot",
renderent(e, @"carrot", (float)(1 +
(float)(1 +
sin(lastmillis / 100.0 + e.x +
sin(lastmillis / 100.0 + e.x +
e.y) /
20),
lastmillis /
e.y) / 20), lastmillis / (e.attr2 ?
(e.attr2 ? 1.0f : 10.0f),
0, 1, 0, 10.0f);
1.0f : 10.0f), 0, 1, 0, 10.0f);
break;
case 4:
renderent(e, @"switch2", 3,
(float)e.attr3 * 90,
(!e.spawned && !triggertime) ? 1
(!e.spawned && !triggertime) ?
: 0,
(e.spawned || !triggertime) ? 1 : 2,
triggertime, 1050.0f);
1 : 0, (e.spawned || !triggertime) ?
1 : 2, triggertime, 1050.0f);
break;
case 5:
renderent(e, @"switch1", -0.15f,
(float)e.attr3 * 90,
(!e.spawned && !triggertime) ? 30
: 0,
(e.spawned || !triggertime) ? 1
(!e.spawned && !triggertime) ?
30 : 0, (e.spawned ||
!triggertime) ? 1 : 30, triggertime,
: 30,
triggertime, 35.0f);
35.0f);
break;
}
}
}
}
}
|