Browse Source

.c files were ignored.

pull/41/head
Tribeam 3 months ago
parent
commit
a85acaf0ed
4 changed files with 141 additions and 8 deletions
  1. 0
    1
      .gitignore
  2. 0
    6
      pk3/Acs/Lexicon.c
  3. 140
    0
      pk3/Acs/skybox.c
  4. 1
    1
      pk3/DECORATE.txt

+ 0
- 1
.gitignore View File

@@ -3,7 +3,6 @@
3 3
 *.dbs
4 4
 *.err
5 5
 *.bak
6
-*.c
7 6
 Test-Lexicon.bat
8 7
 TextureStore
9 8
 FlatsStore

+ 0
- 6
pk3/Acs/Lexicon.c View File

@@ -659,12 +659,6 @@ strict namespace
659 659
         // if 5 seconds have past
660 660
         if(state_clock > 5*35)
661 661
         {
662
-            for(int p = 0; p < 65; p++)
663
-            {
664
-                TakeActorInventory(p+1337, "Lexicon_VoteGun", 1);
665
-                GiveActorInventory(p+1337, "Pistol", 1);
666
-                GiveActorInventory(p+1337, "Fist", 1);
667
-            }
668 662
             // go to chosen level
669 663
             ChangeLevel(votenames[votechosen][1], 0, CHANGELEVEL_RESETHEALTH|CHANGELEVEL_RESETINVENTORY|CHANGELEVEL_NOINTERMISSION, -1);
670 664
         }

+ 140
- 0
pk3/Acs/skybox.c View File

@@ -0,0 +1,140 @@
1
+
2
+
3
+
4
+function fixed dist2(fixed x1, fixed y1, fixed z1, fixed x2,fixed y2, fixed z2)
5
+{
6
+    int x, y, z;
7
+    x = int(x1 - x2); // Convert fixed point to integer
8
+    y = int(y1 - y2);
9
+    z = int(z1 - z2);
10
+    return fixed(Sqrt( x*x + y*y + z*z ));
11
+}
12
+
13
+// tid 300 = skybox center(center reference point inside the skybox)
14
+// tid 301 = level center(center reference point inside the level)
15
+// tid 302 = skybox(skybox viewpoint tag)
16
+
17
+script "SkyBox" enter clientside
18
+{
19
+    Thing_ChangeTid(0, playernumber()+1337);
20
+    SetActivator(302);
21
+    fixed cx1 = GetActorX(300);
22
+    fixed cy1 = GetActorY(300);
23
+    fixed cz1 = GetActorZ(300);
24
+    fixed cx2 = GetActorX(301);
25
+    fixed cy2 = GetActorY(301);
26
+    fixed cz2 = GetActorZ(301);
27
+
28
+    fixed px = GetActorX(1337);
29
+    fixed py = GetActorY(1337);
30
+    fixed pz = GetActorZ(1337);
31
+
32
+    fixed dx = cx2 - px;
33
+    fixed dy = cy2 - py;
34
+    fixed dz = cz2 - pz;
35
+
36
+    fixed a = 0.0;
37
+
38
+    fixed sx = 0.0;
39
+    fixed sy = 0.0;
40
+    fixed sz = 0.0;
41
+
42
+    fixed d = 0.0;
43
+
44
+    while(1)
45
+    {
46
+        // if any map scripts move the reference points, we should know about it
47
+        cx1 = GetActorX(300);
48
+        cy1 = GetActorY(300);
49
+        cz1 = GetActorZ(300);
50
+        cx2 = GetActorX(301);
51
+        cy2 = GetActorY(301);
52
+        cz2 = GetActorZ(301);
53
+
54
+        px = GetActorX(1337);
55
+        py = GetActorY(1337);
56
+        pz = GetActorZ(1337);
57
+
58
+        dx = px - cx2;
59
+        dy = py - cy2;
60
+        dz = pz - cz2;
61
+
62
+        a = VectorAngle(dx, dy);
63
+        d = dist2(px, py, 0.0, cx2, cy2, 0.0) / 8.0;
64
+
65
+        sx = cx1 + (cos(a)*d);
66
+        sy = cy1 + (sin(a)*d);
67
+        sz = cz1 + dz/8.0;
68
+
69
+        Warp(302, sx, sy, sz, 0.0, WARPF_INTERPOLATE|WARPF_ABSOLUTEPOSITION|WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION);
70
+
71
+        delay(1);
72
+    }
73
+}
74
+
75
+/*
76
+int cycle[12][3] =
77
+{
78
+	{ 0xFF, 0xFF, 0x00 },
79
+	{ 0x7F, 0xFF, 0x00 },
80
+	{ 0x00, 0xFF, 0x00 },
81
+	{ 0x00, 0xFF, 0x7F },
82
+	{ 0x00, 0xFF, 0xFF },
83
+	{ 0x00, 0x7F, 0xFF },
84
+	{ 0x00, 0x00, 0xFF },
85
+	{ 0x7F, 0x00, 0xFF },
86
+	{ 0xFF, 0x00, 0xFF },
87
+	{ 0xFF, 0x00, 0x7F },
88
+	{ 0xFF, 0x00, 0x00 },
89
+	{ 0xFF, 0x7F, 0x00 }
90
+};
91
+
92
+
93
+script 1 open clientside
94
+{
95
+	int i = 0;
96
+	int i2 = 1;
97
+	int r = 0;
98
+	int g = 0;
99
+	int b = 0;
100
+	while(1)
101
+	{
102
+		int t = 0;
103
+		while(t < 1.0)
104
+		{
105
+			t += 0.005;
106
+
107
+			r = cycle[i][0]+lerpf(cycle[i][0], cycle[i2][0], t);
108
+			g = cycle[i][1]+lerpf(cycle[i][1], cycle[i2][1], t);
109
+			b = cycle[i][2]+lerpf(cycle[i][2], cycle[i2][2], t);
110
+
111
+			// lazy inaccuracy fix
112
+			if(r > 255) { r = 255; }
113
+			if(g > 255) { g = 255; }
114
+			if(b > 255) { b = 255; }
115
+			if(r < 0) { r = 0; }
116
+			if(g < 0) { g = 0; }
117
+			if(b < 0) { b = 0; }
118
+
119
+			Sector_SetColor(8, r, g, b);
120
+			Sector_SetColor(3, r, g, b);
121
+			Sector_SetColor(1, r, g, b);
122
+			delay(1);
123
+		}
124
+		i++;
125
+		i2 = i+1;
126
+		if(i > 11) { i = 0; i2 = 1; }
127
+		if(i2 > 11) { i2 = 0; }
128
+	}
129
+}
130
+*/
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+

+ 1
- 1
pk3/DECORATE.txt View File

@@ -32,7 +32,7 @@ ACTOR Lexicon_VoteGun : DoomWeapon
32 32
     VOTE A 1 A_Raise
33 33
     Loop
34 34
   Fire:
35
-    VOTE A 10 A_RailAttack(0, 10, false, "none", "White", 0, 0, "BulletPuff", 0, 0, 1024.0, 70, 0.5, 0.5)
35
+    VOTE A 10 A_RailAttack(0, 8, false, "none", "White", 0, 0, "BulletPuff", 0, 0, 1024.0, 70, 0.5, 0.5)
36 36
     VOTE A 0 A_ReFire
37 37
     Goto Ready
38 38
   Spawn:

Loading…
Cancel
Save