local disable = "Command disabled by admins." local bigmobjs = CV_RegisterVar({ name = "a_bigmobjs", defaultvalue = "Off", flags = CV_NETVAR, PossibleValue = CV_OnOff }) local forcesmall = CV_RegisterVar({ name = "a_forceallsmall", defaultvalue = "Off", flags = CV_NETVAR, PossibleValue = CV_OnOff }) local forcenosmall = CV_RegisterVar({ name = "a_notinypeople", defaultvalue = "Off", flags = CV_NETVAR, PossibleValue = CV_OnOff }) local detons = CV_RegisterVar({ name = "a_detons", defaultvalue = "Off", flags = CV_NETVAR, PossibleValue = CV_OnOff }) local forcedashmodeoff = CV_RegisterVar({ name = "a_forcenormaldashmodeskin", defaultvalue = "Off", flags = CV_NETVAR, PossibleValue = CV_OnOff }) COM_AddCommand("small", function(player) if (forcesmall.value == 1 or forcenosmall.value == 1) CONS_Printf(player, ""+disable+"") return end if (player.iwannabesmall == false) player.iwannabesmall = true CONS_Printf(player, "you will now take on the levels small") elseif (player.iwannabesmall == true) player.iwannabesmall = false player.mo.destscale = FRACUNIT CONS_Printf(player, "you will no longer take on the levels small") end end) COM_AddCommand("allskindashmode", function(player) if (forcedashmodeoff.value == 1) CONS_Printf(player, ""+disable+"") return end if not (player.allskindashmode) player.allskindashmode = true CONS_Printf(player, "you now have dashmode") elseif (player.allskindashmode == true) player.allskindashmode = false CONS_Printf(player, "you no longer have dashmode") end end) COM_AddCommand("superafterimage", function(player) if not (player.superafterimagething) player.superafterimagething = true CONS_Printf(player, "you now summon some afterimages when super") elseif (player.superafterimagething == true) player.superafterimagething = false CONS_Printf(player, "you no longer summon some afterimages when super") end end) addHook("PlayerThink", function(player) if not (player.charflags & SF_DASHMODE) // you already have it most likely and (player.allskindashmode == true) and not (forcedashmodeoff.value == 1) player.charflags = $|SF_DASHMODE end end) addHook("PlayerThink", function(player) if (player.charflags & SF_DASHMODE) and (player.mo ~= nil and player.mo and player.mo.valid) and (player.allskindashmode == false or forcedashmodeoff.value == 1) and not (skins[player.mo.skin].flags & SF_DASHMODE) player.charflags = $ & ~SF_DASHMODE end end) addHook("PlayerThink", function(player) if (player.powers[pw_super]) and (player.superafterimagething == true) player.afterimageghost = P_SpawnGhostMobj(player.mo) player.afterimageghost.destscale = $ + FixedMul(2*FRACUNIT, 2*FRACUNIT) player.afterimageghost.colorized = true if (player.afterimageghost and player.afterimageghost.valid) P_TeleportMove(player.afterimageghost, player.mo.x, player.mo.y, player.mo.z) end end end) addHook("PlayerThink", function(player) if (player.solchar and player.solchar.istransformed) and (player.superafterimagething == true) player.afterimageghost = P_SpawnGhostMobj(player.mo) player.afterimageghost.destscale = $ + FixedMul(2*FRACUNIT, 2*FRACUNIT) player.afterimageghost.colorized = true if (player.afterimageghost and player.afterimageghost.valid) P_TeleportMove(player.afterimageghost, player.mo.x, player.mo.y, player.mo.z) end end end) addHook("PlayerThink", function(player) if (player.hypermysticsonic) and (player.superafterimagething == true) player.afterimageghost = P_SpawnGhostMobj(player.mo) player.afterimageghost.destscale = $ + FixedMul(2*FRACUNIT, 2*FRACUNIT) player.afterimageghost.colorized = true if (player.afterimageghost and player.afterimageghost.valid) P_TeleportMove(player.afterimageghost, player.mo.x, player.mo.y, player.mo.z) end end end) addHook("PlayerThink", function(player) if (player.darkform ~= nil and player.darkform.on) and (player.superafterimagething == true) player.afterimageghost = P_SpawnGhostMobj(player.mo) player.afterimageghost.destscale = $ + FixedMul(2*FRACUNIT, 2*FRACUNIT) player.afterimageghost.colorized = true if (player.afterimageghost and player.afterimageghost.valid) P_TeleportMove(player.afterimageghost, player.mo.x, player.mo.y, player.mo.z) end end end) addHook("MobjThinker", function(mo) if (mo.type ~= MT_DETON) and (detons.value == 1) and (mo.flags & MF_ENEMY) and not (mo.type == MT_PLAYER) and not (mo.flags & MF_BOSS) mo.type = MT_DETON end end) addHook("PlayerThink", function(player) if (player.iwannabesmall == nil) player.iwannabesmall = false end if (player.iwannabesmall or forcesmall.value == 1) player.mo.scale = FRACUNIT + FRACUNIT/4 - FRACUNIT/1 end end) addHook("MobjSpawn", function(mo) if not (mo.type == MT_PLAYER) and (bigmobjs.value == 1) mo.scale = FRACUNIT + FRACUNIT + FRACUNIT/7 end end)