Assorted fixes
adds back stuff that was removed that is needed. Also brings tries fixing percentage
This commit is contained in:
parent
473917e572
commit
dec535e42e
6 changed files with 47 additions and 20 deletions
|
|
@ -1530,7 +1530,7 @@ boolean G_Responder(event_t *ev)
|
|||
if (gamestate == GS_LEVEL && ev->type == ev_keydown
|
||||
&& (ev->data1 == KEY_F12 || ev->data1 == gamecontrol[0][gc_viewpoint][0] || ev->data1 == gamecontrol[0][gc_viewpoint][1]))
|
||||
{
|
||||
if (!demo.playback && (r_splitscreen || !netgame))
|
||||
if (!demo.playback && (r_splitscreen))
|
||||
g_localplayers[0] = consoleplayer;
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "doomdef.h"
|
||||
#include "d_player.h"
|
||||
#include "g_game.h"
|
||||
#include "p_mobj.h"
|
||||
#include "r_main.h"
|
||||
#include "p_local.h"
|
||||
#include "k_bot.h"
|
||||
|
|
@ -167,9 +168,13 @@ void K_UpdateMatchRaceBots(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (difficulty == 0 || !(gametyperules & GTR_BOTS) || bossinfo.boss == true)
|
||||
if (difficulty == 0 || !(gametyperules & GTR_BOTS) || bossinfo.boss == true || numbosswaypoints > 0)
|
||||
{
|
||||
wantedbots = 0;
|
||||
if (numbosswaypoints > 0)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "Bots do not work on maps using the legacy checkpoint system.\nPlease consider using waypoints instead if bot support is desired!\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -278,7 +283,7 @@ boolean K_PlayerUsesBotMovement(player_t *player)
|
|||
boolean K_BotCanTakeCut(player_t *player)
|
||||
{
|
||||
if (
|
||||
(K_TripwirePassConditions(player) != TRIPWIRE_NONE || K_ApplyOffroad(player) == false)
|
||||
((K_TripwirePassConditions(player) != TRIPWIRE_NONE) || (K_ApplyOffroad(player) == false))
|
||||
|| player->itemtype == KITEM_SNEAKER
|
||||
|| player->itemtype == KITEM_ROCKETSNEAKER
|
||||
|| player->itemtype == KITEM_INVINCIBILITY
|
||||
|
|
|
|||
|
|
@ -208,7 +208,16 @@ void K_InitGrandPrixBots(void)
|
|||
playercount += (numplayers-2) * 3;
|
||||
}
|
||||
|
||||
wantedbots = playercount - numplayers;
|
||||
if (numbosswaypoints > 0)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "Bots do not work on maps using the legacy checkpoint system.\nPlease consider using waypoints instead if bot support is desired!\n");
|
||||
wantedbots = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
wantedbots = playercount - numplayers;
|
||||
}
|
||||
|
||||
// Create rival list
|
||||
if (numplayers > 0)
|
||||
|
|
|
|||
|
|
@ -2493,7 +2493,8 @@ static void K_drawKartSpeedometer(void)
|
|||
{
|
||||
case 1: // Sonic Drift 2 style percentage
|
||||
default:
|
||||
convSpeed = (stplyr->speed * 100) / K_GetKartSpeed(stplyr, false, true); // Based on top speed!
|
||||
if (stplyr->mo)
|
||||
convSpeed = (FixedDiv(stplyr->speed, FixedMul(K_GetKartSpeed(stplyr, false, false), ORIG_FRICTION))*100)>>FRACBITS;
|
||||
labeln = 0;
|
||||
break;
|
||||
case 2: // Kilometers
|
||||
|
|
|
|||
17
src/p_map.c
17
src/p_map.c
|
|
@ -2722,24 +2722,32 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
{
|
||||
// Assign thing's standingslope if needed
|
||||
if (thing->z <= tmfloorz && !(thing->eflags & MFE_VERTICALFLIP)) {
|
||||
|
||||
K_UpdateMobjTerrain(thing, tmfloorpic);
|
||||
|
||||
if (!startingonground && tmfloorslope)
|
||||
P_HandleSlopeLanding(thing, tmfloorslope);
|
||||
|
||||
if (thing->momz <= 0)
|
||||
{
|
||||
thing->standingslope = tmfloorslope;
|
||||
P_SetPitchRollFromSlope(thing, thing->standingslope);
|
||||
|
||||
if (thing->momz == 0 && thing->player && !startingonground)
|
||||
P_PlayerHitFloor(thing->player, true);
|
||||
}
|
||||
}
|
||||
else if (thing->z+thing->height >= tmceilingz && (thing->eflags & MFE_VERTICALFLIP)) {
|
||||
|
||||
K_UpdateMobjTerrain(thing, tmceilingpic);
|
||||
|
||||
if (!startingonground && tmceilingslope)
|
||||
P_HandleSlopeLanding(thing, tmceilingslope);
|
||||
|
||||
if (thing->momz >= 0)
|
||||
{
|
||||
thing->standingslope = tmceilingslope;
|
||||
P_SetPitchRollFromSlope(thing, thing->standingslope);
|
||||
|
||||
if (thing->momz == 0 && thing->player && !startingonground)
|
||||
P_PlayerHitFloor(thing->player, true);
|
||||
|
|
@ -2747,8 +2755,10 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
}
|
||||
}
|
||||
else // don't set standingslope if you're not going to clip against it
|
||||
{
|
||||
thing->standingslope = NULL;
|
||||
|
||||
thing->terrain = NULL;
|
||||
}
|
||||
thing->x = x;
|
||||
thing->y = y;
|
||||
|
||||
|
|
@ -2774,10 +2784,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
oldside = P_PointOnLineSide(oldx, oldy, ld);
|
||||
if (side != oldside)
|
||||
{
|
||||
if (ld->special)
|
||||
{
|
||||
P_CrossSpecialLine(ld, oldside, thing);
|
||||
}
|
||||
P_CrossSpecialLine(ld, oldside, thing);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -648,6 +648,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
fixed_t textop, texbottom, texheight;
|
||||
fixed_t texmid, delta1, delta2;
|
||||
INT32 texnum = R_GetTextureNum(side->midtexture); // make sure the texture is actually valid
|
||||
vertex_t cross;
|
||||
|
||||
if (texnum) {
|
||||
// Get the midtexture's height
|
||||
|
|
@ -682,18 +683,22 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
|||
texbottom = textop - texheight*(side->repeatcnt+1);
|
||||
}
|
||||
}
|
||||
P_ClosestPointOnLine(tmx, tmy, linedef, &cross);
|
||||
|
||||
if (P_GetMidtextureTopBottom(linedef, cross.x, cross.y, &textop, &texbottom))
|
||||
{
|
||||
texmid = texbottom+(textop-texbottom)/2;
|
||||
|
||||
texmid = texbottom+(textop-texbottom)/2;
|
||||
delta1 = abs(mobj->z - texmid);
|
||||
delta2 = abs(thingtop - texmid);
|
||||
|
||||
delta1 = abs(mobj->z - texmid);
|
||||
delta2 = abs(thingtop - texmid);
|
||||
|
||||
if (delta1 > delta2) { // Below
|
||||
if (opentop > texbottom)
|
||||
opentop = texbottom;
|
||||
} else { // Above
|
||||
if (openbottom < textop)
|
||||
openbottom = textop;
|
||||
if (delta1 > delta2) { // Below
|
||||
if (opentop > texbottom)
|
||||
opentop = texbottom;
|
||||
} else { // Above
|
||||
if (openbottom < textop)
|
||||
openbottom = textop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue