Extended hitbox feature from devel.
This commit is contained in:
parent
0a8e01b42a
commit
8bb133cfc6
8 changed files with 52 additions and 3 deletions
|
|
@ -120,6 +120,7 @@ nosave string swwm_menuposehistory = ""; // stores currently seen poses for the
|
|||
nosave string swwm_titlesubhistory = ""; // stores currently seen subtitles for the title screen, for shuffling
|
||||
nosave noarchive int swwm_profstart = 0; // starts profiling as soon as handler is registered for specified >0 tics
|
||||
server bool swwm_nodeathexit = false; // completely sidesteps the inventory resetting of death exits, if you hate those
|
||||
server bool swwm_extendedpickup = false; // items will have an additional "virtual hitbox" that's the same size as vanilla
|
||||
|
||||
// minimap settings
|
||||
nosave bool swwm_mm_enable = true; // show a minimap below the score counter
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ SWWM_VOICEAMP = "Voice Amplification";
|
|||
SWWM_CLEARFX = "Clear All Effects";
|
||||
SWWM_OLDLOGO = "Old Branding";
|
||||
SWWM_NODEATHEXIT = "Disable Death Exits";
|
||||
SWWM_EXTENDEDPICKUP = "Extend Item Size";
|
||||
SWWM_MMTITLE = "Minimap Settings";
|
||||
SWWM_MM_ENABLE = "Show Minimap";
|
||||
SWWM_MM_ROTATE = "Rotate Minimap";
|
||||
|
|
@ -366,6 +367,7 @@ TOOLTIP_SWWM_VOICEAMP = "At their default volume, the Demolitionist's voice line
|
|||
TOOLTIP_NETEVENT_SWWMCLEAREFFECTS = "Fades out any active blood, gore, debris and casings.";
|
||||
TOOLTIP_SWWM_OLDLOGO = "For those who miss the days of SWWM GZ, you can restore the old title screen and main menu with this.";
|
||||
TOOLTIP_SWWM_NODEATHEXIT = "This option completely negates the effects of death exits, if you don't like losing all your stuff.";
|
||||
TOOLTIP_SWWM_EXTENDEDPICKUP = "Gives all items a vanilla-sized \"virtual hitbox\" that allows picking them up from farther away. Requires a map restart if changed.";
|
||||
TOOLTIP_SWWMMINIMAPMENU = "Configure the minimap.";
|
||||
TOOLTIP_SWWMACHIEVEMENTMENU = "View your achievements.";
|
||||
TOOLTIP_SWWM_MM_ENABLE = "Displays a minimap under the score counter.";
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ SWWM_VOICEAMP = "Amplificación de Voz";
|
|||
SWWM_CLEARFX = "Limpiar todos los Efectos";
|
||||
SWWM_OLDLOGO = "Marca Antigua";
|
||||
SWWM_NODEATHEXIT = "Desactivar Salidas de Muerte";
|
||||
SWWM_EXTENDEDPICKUP = "Extender Tamaño de Ítem";
|
||||
SWWM_MMTITLE = "Opciones de Minimapa";
|
||||
SWWM_MM_ENABLE = "Mostrar Minimapa";
|
||||
SWWM_MM_ROTATE = "Rotar Minimapa";
|
||||
|
|
@ -370,6 +371,7 @@ TOOLTIP_SWWM_VOICEAMP = "A su volumen normal, las voces de la Demolicionista pue
|
|||
TOOLTIP_NETEVENT_SWWMCLEAREFFECTS = "Desvanece cualquier sangre, vísceras, escombros y casquillos activos.";
|
||||
TOOLTIP_SWWM_OLDLOGO = "Para quienes echan de menos los viejos tiempos de SWWM GZ, podeis restaurar la antigua pantalla de inicio y menú principal con esto.";
|
||||
TOOLTIP_SWWM_NODEATHEXIT = "Esta opción invalida completamente los efectos de las salidas de muerte, si no te gusta perder todas tus cosas.";
|
||||
TOOLTIP_SWWM_EXTENDEDPICKUP = "Da a todos los ítems una \"hitbox virtual\" de tamaño vanilla que permite recogerlos a mayor distancia. Requiere reinicio de mapa si se cambia.";
|
||||
TOOLTIP_SWWMMINIMAPMENU = "Configura el minimapa.";
|
||||
TOOLTIP_SWWMACHIEVEMENTMENU = "Revisa tus logros.";
|
||||
TOOLTIP_SWWM_MM_ENABLE = "Muestra un minimapa bajo el contador de puntuación.";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2.2 \cu(Sun 27 Mar 03:08:46 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.2.2 \cu(2022-03-27 03:08:46)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.2.2 \cu(Sun 27 Mar 15:29:24 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.2.2 \cu(2022-03-27 15:29:24)\c-";
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ OptionMenu "SWWMOptionMenu"
|
|||
StaticText "$SWWM_ITITLE", 1
|
||||
Option "$SWWM_USETOPICKUP", "swwm_usetopickup", "YesNo"
|
||||
Option "$SWWM_MELEEPICKUP", "swwm_meleepickup", "YesNo"
|
||||
Option "$SWWM_EXTENDEDPICKUP", "swwm_extendedpickup", "YesNo"
|
||||
Option "$SWWM_ARMORUSE", "swwm_autousearmor", "YesNo"
|
||||
Option "$SWWM_HEALTHUSE", "swwm_autousehealth", "YesNo"
|
||||
IfGame(Doom)
|
||||
|
|
|
|||
|
|
@ -111,7 +111,9 @@ extend Class SWWMHandler
|
|||
if ( a == players[consoleplayer].Camera ) continue;
|
||||
if ( a.bINVISIBLE && !(a is 'DynamicLight') ) continue;
|
||||
if ( (a is 'Inventory') && Inventory(a).Owner ) continue;
|
||||
if ( (a is 'SWWMShadow') || (a is 'GhostArtifactX') || (a is 'DemolitionistSelfLight') || (a is 'HeadpatTracker') ) continue;
|
||||
if ( (a is 'SWWMPickupFlash') && (a.CurState == a.FindState('Pickup')) ) continue;
|
||||
if ( (a is 'SWWMShadow') || (a is 'GhostArtifactX') || (a is 'DemolitionistSelfLight') || (a is 'HeadpatTracker') || (a is 'SWWMExtendedItemHitbox')
|
||||
|| (a is 'SWWMTeleportLine') || (a is 'SWWMTeleportDest') ) continue;
|
||||
if ( a.Distance3DSquared(e.Camera) > 1000000 ) continue;
|
||||
DrawActor(e,a);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,10 +52,43 @@ Class CrossLineFinder : LineTracer
|
|||
}
|
||||
}
|
||||
|
||||
// hitbox with default collision size for items
|
||||
Class SWWMExtendedItemHitbox : Actor
|
||||
{
|
||||
override void Tick()
|
||||
{
|
||||
if ( !master )
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
if ( pos != master.pos ) SetOrigin(master.pos,false);
|
||||
}
|
||||
override void Touch( Actor toucher )
|
||||
{
|
||||
if ( !master || !master.bSPECIAL || !swwm_extendedpickup )
|
||||
return;
|
||||
master.Touch(toucher);
|
||||
}
|
||||
default
|
||||
{
|
||||
+NOGRAVITY;
|
||||
+SPECIAL;
|
||||
}
|
||||
}
|
||||
|
||||
Mixin Class SWWMUseToPickup
|
||||
{
|
||||
bool bUsePickup;
|
||||
|
||||
override void BeginPlay()
|
||||
{
|
||||
Super.BeginPlay();
|
||||
if ( !swwm_extendedpickup ) return;
|
||||
let box = Spawn("SWWMExtendedItemHitbox",pos);
|
||||
box.master = self;
|
||||
}
|
||||
|
||||
// allow pickup by use
|
||||
override bool Used( Actor user )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,6 +47,14 @@ Class SWWMWeapon : Weapon abstract
|
|||
return null;
|
||||
}
|
||||
|
||||
override void BeginPlay()
|
||||
{
|
||||
Super.BeginPlay();
|
||||
if ( !swwm_extendedpickup ) return;
|
||||
let box = Spawn("SWWMExtendedItemHitbox",pos);
|
||||
box.master = self;
|
||||
}
|
||||
|
||||
override void Touch( Actor toucher )
|
||||
{
|
||||
// show prompt to swap weapon, and prevent normal pickup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue