quake2ts 0.0.518 → 0.0.519
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/client/dist/browser/index.global.js +8 -8
- package/packages/client/dist/browser/index.global.js.map +1 -1
- package/packages/game/dist/browser/index.global.js +5 -5
- package/packages/game/dist/browser/index.global.js.map +1 -1
- package/packages/game/dist/cjs/index.cjs +30 -0
- package/packages/game/dist/cjs/index.cjs.map +1 -1
- package/packages/game/dist/esm/index.js +30 -0
- package/packages/game/dist/esm/index.js.map +1 -1
- package/packages/game/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/game/dist/types/entities/monsters/floater.d.ts.map +1 -1
- package/packages/game/dist/types/entities/monsters/icarus.d.ts.map +1 -1
- package/packages/game/dist/types/entities/monsters/medic.d.ts.map +1 -1
- package/packages/game/dist/types/entities/monsters/tank.d.ts.map +1 -1
- package/packages/game/dist/types/entities/targets.d.ts.map +1 -1
|
@@ -7492,6 +7492,17 @@ function useTargetAchievement(self, other, activator, context) {
|
|
|
7492
7492
|
function useTargetStory(self, other, activator, context) {
|
|
7493
7493
|
context.entities.imports.configstring(ConfigStringIndex.Story, self.message || "");
|
|
7494
7494
|
}
|
|
7495
|
+
function target_delay_think(self, context) {
|
|
7496
|
+
context.entities.useTargets(self, self.activator);
|
|
7497
|
+
}
|
|
7498
|
+
function useTargetDelay(self, other, activator, context) {
|
|
7499
|
+
self.activator = activator;
|
|
7500
|
+
self.think = (s) => target_delay_think(s, context);
|
|
7501
|
+
let time = self.wait;
|
|
7502
|
+
if (!time && self.delay) time = self.delay;
|
|
7503
|
+
if (!time) time = 1;
|
|
7504
|
+
self.nextthink = context.entities.timeSeconds + time;
|
|
7505
|
+
}
|
|
7495
7506
|
var SPAWNFLAG_TARGET_LIGHT_START_ON = 1;
|
|
7496
7507
|
var SPAWNFLAG_TARGET_LIGHT_NO_LERP = 2;
|
|
7497
7508
|
var SPAWNFLAG_TARGET_LIGHT_FLICKER = 4;
|
|
@@ -7862,6 +7873,11 @@ function registerTargetSpawns(registry) {
|
|
|
7862
7873
|
}
|
|
7863
7874
|
entity.use = (self, other, activator) => useTargetStory(self, other, activator ?? null, context);
|
|
7864
7875
|
});
|
|
7876
|
+
registry.register("target_delay", (entity, context) => {
|
|
7877
|
+
if (!entity.wait) entity.wait = 1;
|
|
7878
|
+
entity.use = (self, other, activator) => useTargetDelay(self, other, activator ?? null, context);
|
|
7879
|
+
entity.svflags |= 1 /* NoClient */;
|
|
7880
|
+
});
|
|
7865
7881
|
registry.register("target_light", (entity, context) => {
|
|
7866
7882
|
entity.modelindex = 1;
|
|
7867
7883
|
entity.renderfx = RenderFx.CustomLight;
|
|
@@ -15033,6 +15049,11 @@ function SP_monster_floater(self, context) {
|
|
|
15033
15049
|
if (self2.health < self2.max_health / 2) {
|
|
15034
15050
|
self2.monsterinfo.current_move = pain_move;
|
|
15035
15051
|
}
|
|
15052
|
+
if (context.entities.rng.frandom() < 0.5) {
|
|
15053
|
+
context.entities.sound?.(self2, 0, "floater/fltpain1.wav", 1, 1, 0);
|
|
15054
|
+
} else {
|
|
15055
|
+
context.entities.sound?.(self2, 0, "floater/fltpain2.wav", 1, 1, 0);
|
|
15056
|
+
}
|
|
15036
15057
|
};
|
|
15037
15058
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
15038
15059
|
self2.deadflag = 2 /* Dead */;
|
|
@@ -15042,6 +15063,7 @@ function SP_monster_floater(self, context) {
|
|
|
15042
15063
|
context.entities.free(self2);
|
|
15043
15064
|
return;
|
|
15044
15065
|
}
|
|
15066
|
+
context.entities.sound?.(self2, 0, "floater/fltdeth1.wav", 1, 1, 0);
|
|
15045
15067
|
floater_die(self2);
|
|
15046
15068
|
};
|
|
15047
15069
|
self.monsterinfo.stand = floater_stand;
|
|
@@ -16167,6 +16189,11 @@ function SP_monster_icarus(self, context) {
|
|
|
16167
16189
|
if (self2.health < self2.max_health / 2) {
|
|
16168
16190
|
self2.monsterinfo.current_move = pain_move5;
|
|
16169
16191
|
}
|
|
16192
|
+
if (context.entities.rng.frandom() < 0.5) {
|
|
16193
|
+
context.entities.sound?.(self2, 0, "icarus/icrpain1.wav", 1, 1, 0);
|
|
16194
|
+
} else {
|
|
16195
|
+
context.entities.sound?.(self2, 0, "icarus/icrpain2.wav", 1, 1, 0);
|
|
16196
|
+
}
|
|
16170
16197
|
};
|
|
16171
16198
|
self.die = (self2, inflictor, attacker, damage, point) => {
|
|
16172
16199
|
self2.deadflag = 2 /* Dead */;
|
|
@@ -16176,6 +16203,7 @@ function SP_monster_icarus(self, context) {
|
|
|
16176
16203
|
context.entities.free(self2);
|
|
16177
16204
|
return;
|
|
16178
16205
|
}
|
|
16206
|
+
context.entities.sound?.(self2, 0, "icarus/icrdeth1.wav", 1, 1, 0);
|
|
16179
16207
|
icarus_die(self2);
|
|
16180
16208
|
};
|
|
16181
16209
|
self.monsterinfo.stand = icarus_stand;
|
|
@@ -18841,6 +18869,7 @@ function SP_monster_medic(self, context) {
|
|
|
18841
18869
|
context.entities.free(self2);
|
|
18842
18870
|
return;
|
|
18843
18871
|
}
|
|
18872
|
+
context.entities.sound?.(self2, 0, "medic/meddeth1.wav", 1, 1, 0);
|
|
18844
18873
|
medic_die(self2);
|
|
18845
18874
|
};
|
|
18846
18875
|
self.monsterinfo.stand = medic_stand;
|
|
@@ -20584,6 +20613,7 @@ function SP_monster_tank(self, context) {
|
|
|
20584
20613
|
context.entities.free(self2);
|
|
20585
20614
|
return;
|
|
20586
20615
|
}
|
|
20616
|
+
context.entities.sound?.(self2, 0, "tank/tnkdeth2.wav", 1, 1, 0);
|
|
20587
20617
|
tank_die(self2);
|
|
20588
20618
|
};
|
|
20589
20619
|
self.monsterinfo.stand = tank_stand;
|