}
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Field of View:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Field of view:"));
me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 1, "fov"));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Damage kick:"));
me.TR(me);
sl = makeXonoticSlider(0.45, 0.75, 0.01, "cl_bobcycle");
me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "View bobbing:"));
- me.TD(me, 1, 2, sl);
-
- me.TR(me);
+ me.TD(me, 1, 2, sl);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Zoom Factor:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Zoom factor:"));
me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
me.TR(me);
sl = makeXonoticSlider(1, 8, 0.5, "cl_zoomspeed");
e0.textEntity = main.weaponsDialog;
e0.allowCut = 1;
me.TR(me);
- me.TR(me);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon crosshairs"));
- me.TD(me, 1, 1.3, e = makeXonoticCheckBox(1, "crosshair_color_override", "& crosshair colors"));
+ me.TD(me, 1, 0.75, e = makeXonoticTextLabel(0, "Crosshair:"));
+ me.TD(me, 1, 1.00, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
+ me.TD(me, 1, 1.25, e = makeXonoticCheckBox(1, "crosshair_color_override", "& Per weapon colors"));
setDependent(e, "crosshair_per_weapon", 1, 1);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair:"));
+ me.TDempty(me, 0.5);
for(i = 1; i <= 10; ++i) {
me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
setDependent(e, "crosshair_per_weapon", 0, 0);
}
me.TR(me);
- me.TDempty(me, 1);
+ me.TDempty(me, 0.5);
for(i = 11; i <= 20; ++i) {
me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
setDependent(e, "crosshair_per_weapon", 0, 0);
}
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Size:"));
- me.TD(me, 1, 2, e = makeXonoticSlider(0.40, 2, 0.05, "crosshair_size"));
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair size:"));
+ me.TD(me, 1, 1.8, e = makeXonoticSlider(0.10, 1.5, 0.05, "crosshair_size"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Alpha:"));
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_alpha"));
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair alpha:"));
+ me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_color_alpha"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Red:"));
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_red"));
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair red:"));
+ me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_red"));
setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Green:"));
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_green"));
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair green:"));
+ me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_green"));
setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair Blue:"));
- me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_blue"));
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair blue:"));
+ me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_blue"));
setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+ me.TR(me);
+ me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable centered dot"));
+ me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Size:"));
+ me.TD(me, 1, 0.9, e = makeXonoticSlider(0.2, 2, 0.1, "crosshair_dot_size"));
+ setDependent(e, "crosshair_dot", 1, 1);
+ me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Alpha:"));
+ me.TD(me, 1, 0.9, e = makeXonoticSlider(0.10, 1, 0.1, "crosshair_dot_alpha"));
+ setDependent(e, "crosshair_dot", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Hit test:"));
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "0", "None"));
me.TDempty(me, 0.5);
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 2.2, e = makeXonoticButton("HUD Setup", '0 0 0'));
+ me.TD(me, 1, 2.2, e = makeXonoticButton("Enter HUD editor", '0 0 0'));
e.onClick = HUDSetup_Join_Click;
e.onClickEntity = me;
me.TDempty(me, 0.5);
me.TR(me);
#ifdef ALLOW_FORCEMODELS
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Force Models:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Force models:"));
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, string_null, string_null, "None"));
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodels", string_null, "All"));
o1 = WarpZone_TransformOrigin(self, o0);
v1 = WarpZone_TransformVelocity(self, v0);
- if(player.classname == "player")
+ if(clienttype(player) != CLIENTTYPE_NOTACLIENT)
a1 = WarpZone_TransformVAngles(self, player.v_angle);
else
a1 = WarpZone_TransformAngles(self, a0);
void WarpZoneCamera_InitStep_FindTarget()
{
+ entity e;
+ float i;
if(self.target == "")
{
error("Camera with no target");
return;
}
- self.enemy = find(world, targetname, self.target);
+ self.enemy = world;
+ for(e = world, i = 0; (e = find(e, targetname, self.target)); )
+ if(random() * ++i < 1)
+ self.enemy = e;
if(self.enemy == world)
{
error("Camera with nonexisting target");
}
++warpzone_cameras_exist;
WarpZone_Camera_SetUp(self, self.enemy.origin, self.enemy.angles);
+ self.SendFlags = 0xFFFFFF;
}
void WarpZone_InitStep_UpdateTransform()
WarpZone_InitStep_ClearTarget();
for(self = warpzone_first; self; self = self.warpzone_next)
WarpZone_InitStep_FindTarget();
+ for(self = warpzone_camera_first; self; self = self.warpzone_next)
+ WarpZoneCamera_InitStep_FindTarget();
for(self = warpzone_first; self; self = self.warpzone_next)
WarpZone_InitStep_FinalizeTransform();
self = e;
WarpZone_InitStep_FindOriginTarget();
for(self = warpzone_position_first; self; self = self.warpzone_next)
WarpZonePosition_InitStep_FindTarget();
- for(self = warpzone_camera_first; self; self = self.warpzone_next)
- WarpZoneCamera_InitStep_FindTarget();
for(self = warpzone_first; self; self = self.warpzone_next)
WarpZone_InitStep_UpdateTransform();
self = e;
WarpZone_StoreProjectileData(e);
}
+.float warpzone_reconnecting;
+float visible_to_some_client(entity ent)
+{
+ entity e;
+ for(e = nextent(world); clienttype(e) != CLIENTTYPE_NOTACLIENT; e = nextent(e))
+ if(e.classname == "player" && clienttype(e) == CLIENTTYPE_REAL)
+ if(checkpvs(e.origin + e.view_ofs, ent))
+ return 1;
+ return 0;
+}
void trigger_warpzone_reconnect_use()
{
entity e;
// NOTE: this matches for target, not targetname, but of course
// targetname must be set too on the other entities
for(self = warpzone_first; self; self = self.warpzone_next)
- if(e.target == "" || self.target == e.target)
+ self.warpzone_reconnecting = ((e.target == "" || self.target == e.target) && !((e.spawnflags & 1) && (visible_to_some_client(self) || visible_to_some_client(self.enemy))));
+ for(self = warpzone_camera_first; self; self = self.warpzone_next)
+ self.warpzone_reconnecting = ((e.target == "" || self.target == e.target) && !((e.spawnflags & 1) && visible_to_some_client(self)));
+ for(self = warpzone_first; self; self = self.warpzone_next)
+ if(self.warpzone_reconnecting)
WarpZone_InitStep_ClearTarget();
for(self = warpzone_first; self; self = self.warpzone_next)
- if(e.target == "" || self.target == e.target)
+ if(self.warpzone_reconnecting)
WarpZone_InitStep_FindTarget();
+ for(self = warpzone_camera_first; self; self = self.warpzone_next)
+ if(self.warpzone_reconnecting)
+ WarpZoneCamera_InitStep_FindTarget();
for(self = warpzone_first; self; self = self.warpzone_next)
- if(e.target == "" || self.target == e.target || self.enemy.target == e.target)
+ if(self.warpzone_reconnecting || self.enemy.warpzone_reconnecting)
WarpZone_InitStep_FinalizeTransform();
self = e;
}