From c7584cace6d08dd19bffcbfa1f4ce57c54be5391 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 29 Jan 2011 10:54:06 +0000 Subject: [PATCH] - sync 3D floor branch with trunk. SVN r3123 (3dfloors2) --- specs/udmf_zdoom.txt | 17 ++--- src/actionspecials.h | 2 +- src/actor.h | 7 +- src/c_cmds.cpp | 4 +- src/d_iwad.cpp | 4 ++ src/doomdata.h | 1 + src/g_doom/a_bossbrain.cpp | 1 + src/intermission/intermission.cpp | 11 +++ src/intermission/intermission.h | 1 + src/memarena.cpp | 1 + src/memarena.h | 6 ++ src/menu/menu.cpp | 4 -- src/menu/readthis.cpp | 12 +--- src/namedef.h | 1 + src/p_3dmidtex.cpp | 10 ++- src/p_3dmidtex.h | 2 +- src/p_acs.cpp | 52 +++++++++----- src/p_enemy.cpp | 17 ++--- src/p_interaction.cpp | 26 ++++--- src/p_lnspec.cpp | 1 + src/p_local.h | 2 + src/p_map.cpp | 20 +++++- src/p_maputl.cpp | 4 +- src/p_mobj.cpp | 73 ++++++++++++++++--- src/p_sight.cpp | 2 +- src/p_udmf.cpp | 4 ++ src/r_things.cpp | 1 + src/sdl/i_input.cpp | 95 +++++++++++++++---------- src/sdl/i_system.cpp | 37 +++++++++- src/sdl/sdlvideo.cpp | 11 ++- src/thingdef/thingdef_codeptr.cpp | 15 ++++ src/thingdef/thingdef_expression.cpp | 1 + src/thingdef/thingdef_properties.cpp | 14 +++- src/version.h | 2 +- wadsrc/CMakeLists.txt | 2 +- wadsrc/static/actors/actor.txt | 3 + wadsrc/static/actors/raven/minotaur.txt | 2 + wadsrc/static/menudef.txt | 9 +-- wadsrc/wadsrc.vcproj | 8 +-- 39 files changed, 352 insertions(+), 133 deletions(-) diff --git a/specs/udmf_zdoom.txt b/specs/udmf_zdoom.txt index 6c2fde912f..51329bad5d 100644 --- a/specs/udmf_zdoom.txt +++ b/specs/udmf_zdoom.txt @@ -112,6 +112,7 @@ Note: All fields default to false unless mentioned otherwise. checkswitchrange = ;// Switches can only be activated when vertically reachable. blockprojectiles = ;// Line blocks all projectiles blockuse = ; // Line blocks all use actions + blocksight = ; // Line blocks monster line of sight } @@ -162,8 +163,8 @@ Note: All fields default to false unless mentioned otherwise. alphafloor = ; // translucency of floor plane (only has meaning with Sector_SetPortal) Default is 1.0. alphaceiling = ; // translucency of ceiling plane (only has meaning with Sector_SetPortal) Default is 1.0. gravity = ; // Sector's gravity. Default is 1.0. - lightcolor = ; // Sector'S light color as RRGGBB value, default = 0xffffff. - fadecolor = ; // Sector'S fog color as RRGGBB value, default = 0x000000. + lightcolor = ; // Sector's light color as RRGGBB value, default = 0xffffff. + fadecolor = ; // Sector's fog color as RRGGBB value, default = 0x000000. desaturation = ; // Color desaturation factor. 0 = none, 1 = full, default = 0. silent = ; // Actors in this sector make no sound, nofallingdamage = ; // Falling damage is disabled in this sector @@ -183,12 +184,8 @@ Note: All fields default to false unless mentioned otherwise. thing { - skill# = // Unlike the base spec, # can range from 1-8. - // 8 is the maximum amount of skills the skill - // menu can display. - class# = // Unlike the base spec, # can range from 1-8. - // 8 is the maximum amount of classes the class - // menu can display. + skill# = // Unlike the base spec, # can range from 1-16. + class# = // Unlike the base spec, # can range from 1-16. conversation = // Assigns a conversation dialogue to this thing. // Parameter is the conversation ID, 0 meaning none. countsecret = ; // Picking up this actor counts as a secret. @@ -292,6 +289,10 @@ Added 'countsecret' actor property. 1.15 14.12.2010 Added vertex floor and ceiling height properties +1.16 23.01.2011 +Added blocksight linedef flag +Removed remarks of 8 being the maximum number of player classes/skill levels the menu can handle so the spec now properly lists 16 as limit. + =============================================================================== EOF =============================================================================== diff --git a/src/actionspecials.h b/src/actionspecials.h index 8fcb3cf8d3..0751621fb3 100644 --- a/src/actionspecials.h +++ b/src/actionspecials.h @@ -227,7 +227,7 @@ DEFINE_SPECIAL(Elevator_LowerToNearest, 247, 2, 2, 2) DEFINE_SPECIAL(HealThing, 248, 1, 2, 2) DEFINE_SPECIAL(Door_CloseWaitOpen, 249, 3, 4, 4) DEFINE_SPECIAL(Floor_Donut, 250, 3, 3, 3) -DEFINE_SPECIAL(FloorAndCeiling_LowerRaise, 251, 3, 3, 3) +DEFINE_SPECIAL(FloorAndCeiling_LowerRaise, 251, 3, 3, 4) DEFINE_SPECIAL(Ceiling_RaiseToNearest, 252, 2, 2, 2) DEFINE_SPECIAL(Ceiling_LowerToLowest, 253, 2, 2, 2) DEFINE_SPECIAL(Ceiling_LowerToFloor, 254, 2, 2, 2) diff --git a/src/actor.h b/src/actor.h index 13425e48a4..83a264f00d 100644 --- a/src/actor.h +++ b/src/actor.h @@ -39,6 +39,7 @@ #include "textures/textures.h" #include "r_blend.h" #include "s_sound.h" +#include "memarena.h" struct subsector_t; // @@ -324,6 +325,7 @@ enum MF6_ADDITIVEPOISONDAMAGE = 0x00100000, MF6_ADDITIVEPOISONDURATION = 0x00200000, MF6_NOMENU = 0x00400000, // Player class should not appear in the class selection menu. + MF6_BOSSCUBE = 0x00800000, // Actor spawned by A_BrainSpit, flagged for timefreeze reasons. // --- mobj.renderflags --- @@ -760,6 +762,7 @@ public: fixed_t GetGravity() const; bool IsSentient() const; const char *GetTag(const char *def = NULL) const; + void SetTag(const char *def); // info for drawing @@ -855,7 +858,8 @@ public: int activationtype; // How the thing behaves when activated with USESPECIAL or BUMPSPECIAL int lastbump; // Last time the actor was bumped, used to control BUMPSPECIAL int Score; // manipulated by score items, ACS or DECORATE. The engine doesn't use this itself for anything. - FNameNoInit Tag; // Strife's tag name. FIXME: should be case sensitive! + FString * Tag; // Strife's tag name. + int DesignatedTeam; // Allow for friendly fire cacluations to be done on non-players. AActor *BlockingMobj; // Actor that blocked the last move line_t *BlockingLine; // Line that blocked the last move @@ -927,6 +931,7 @@ public: private: static AActor *TIDHash[128]; static inline int TIDHASH (int key) { return key & 127; } + static FSharedStringArena mStringPropertyData; friend class FActorIterator; diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index b3e43f92f5..48cb2f1037 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -1028,8 +1028,8 @@ static void PrintSecretString(const char *string, bool thislevel) break; } } - if (foundone) colstr = TEXTCOLOR_YELLOW; - else colstr = TEXTCOLOR_RED; + if (foundone) colstr = TEXTCOLOR_RED; + else colstr = TEXTCOLOR_GREEN; } } FBrokenLines *brok = V_BreakLines(ConFont, screen->GetWidth()*95/100, string); diff --git a/src/d_iwad.cpp b/src/d_iwad.cpp index 0999a77eac..705ff2f727 100644 --- a/src/d_iwad.cpp +++ b/src/d_iwad.cpp @@ -269,6 +269,10 @@ void FIWadManager::ParseIWadInfos(const char *fn) } delete resfile; } + if (mIWadNames.Size() == 0 || mIWads.Size() == 0) + { + I_FatalError("No IWAD definitions found"); + } } diff --git a/src/doomdata.h b/src/doomdata.h index 83345a6714..64ac86e5eb 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -152,6 +152,7 @@ enum ELineFlags ML_FIRSTSIDEONLY = 0x00800000, // activated only when crossed from front side ML_BLOCKPROJECTILE = 0x01000000, ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line + ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight }; diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 0110b0ae5e..d0fb03cbcc 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -142,6 +142,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit) } // [GZ] Calculates when the projectile will have reached destination spit->special2 += level.maptime; + spit->flags6 |= MF6_BOSSCUBE; } if (!isdefault) diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index 0c75575cd3..556f915638 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -612,6 +612,17 @@ void DIntermissionScreenScroller::Init(FIntermissionAction *desc, bool first) mScrollDir = static_cast(desc)->mScrollDir; } +int DIntermissionScreenScroller::Responder (event_t *ev) +{ + int res = Super::Responder(ev); + if (res == -1) + { + mBackground = mSecondPic; + mTicker = mScrollDelay + mScrollTime; + } + return res; +} + void DIntermissionScreenScroller::Drawer () { FTexture *tex = TexMan[mFirstPic]; diff --git a/src/intermission/intermission.h b/src/intermission/intermission.h index 1035bd8f37..ee316c3493 100644 --- a/src/intermission/intermission.h +++ b/src/intermission/intermission.h @@ -268,6 +268,7 @@ public: DIntermissionScreenScroller() {} virtual void Init(FIntermissionAction *desc, bool first); + virtual int Responder (event_t *ev); virtual void Drawer (); }; diff --git a/src/memarena.cpp b/src/memarena.cpp index c44586deef..21cee59a6a 100644 --- a/src/memarena.cpp +++ b/src/memarena.cpp @@ -373,4 +373,5 @@ void FSharedStringArena::FreeAll() FreeBlocks = block; } memset(Buckets, 0, sizeof(Buckets)); + TopBlock = NULL; } diff --git a/src/memarena.h b/src/memarena.h index e933fc0728..8236720183 100644 --- a/src/memarena.h +++ b/src/memarena.h @@ -31,6 +31,9 @@ ** */ +#ifndef __MEMARENA_H +#define __MEMARENA_H + #include "zstring.h" // A general purpose arena. @@ -81,3 +84,6 @@ protected: private: void *Alloc(size_t size) { return NULL; } // No access to FMemArena::Alloc for outsiders. }; + + +#endif \ No newline at end of file diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index c8728515b1..3161b68a55 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -507,11 +507,7 @@ bool M_Responder (event_t *ev) // do we want mouse input? if (ev->subtype >= EV_GUI_FirstMouseEvent && ev->subtype <= EV_GUI_LastMouseEvent) { - // FIXME: Mouse events in SDL code are mostly useless so mouse is - // disabled until that code is fixed - #ifdef _WIN32 if (!m_use_mouse) - #endif return true; } diff --git a/src/menu/readthis.cpp b/src/menu/readthis.cpp index 388dca716a..197981ad36 100644 --- a/src/menu/readthis.cpp +++ b/src/menu/readthis.cpp @@ -98,19 +98,13 @@ void DReadThisMenu::Drawer() prevpic = TexMan[gameinfo.infoPages[mScreen-2].GetChars()]; } + screen->Dim(0, 1.0, 0,0, SCREENWIDTH, SCREENHEIGHT); alpha = MIN (Scale (gametic - mInfoTic, OPAQUE, TICRATE/3), OPAQUE); if (alpha < OPAQUE && prevpic != NULL) { - screen->DrawTexture (prevpic, 0, 0, - DTA_DestWidth, screen->GetWidth(), - DTA_DestHeight, screen->GetHeight(), - TAG_DONE); + screen->DrawTexture (prevpic, 0, 0, DTA_Fullscreen, true, TAG_DONE); } - screen->DrawTexture (tex, 0, 0, - DTA_DestWidth, screen->GetWidth(), - DTA_DestHeight, screen->GetHeight(), - DTA_Alpha, alpha, - TAG_DONE); + screen->DrawTexture (tex, 0, 0, DTA_Fullscreen, true, DTA_Alpha, alpha, TAG_DONE); } diff --git a/src/namedef.h b/src/namedef.h index 52fc87e665..2a3bc3cf23 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -443,6 +443,7 @@ xx(smoothlighting) xx(blockprojectiles) xx(blockuse) xx(hidden) +xx(blocksight) xx(Renderstyle) diff --git a/src/p_3dmidtex.cpp b/src/p_3dmidtex.cpp index 39186ae9f4..b1f14e0b2e 100644 --- a/src/p_3dmidtex.cpp +++ b/src/p_3dmidtex.cpp @@ -256,10 +256,11 @@ bool P_GetMidTexturePosition(const line_t *line, int sideno, fixed_t *ptextop, f // //============================================================================ -bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, fixed_t &opentop, fixed_t &openbottom) +bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, fixed_t &opentop, fixed_t &openbottom, bool *above) { fixed_t tt, tb; + *above = false; if (P_GetMidTexturePosition(linedef, 0, &tt, &tb)) { if (thing->z + (thing->height/2) < (tt + tb)/2) @@ -268,8 +269,11 @@ bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, fixed_t &opent } else { - if(tt > openbottom) openbottom = tt; - + if(tt > openbottom) + { + openbottom = tt; + *above = true; + } // returns true if it touches the midtexture return (abs(thing->z - tt) <= thing->MaxStepHeight); } diff --git a/src/p_3dmidtex.h b/src/p_3dmidtex.h index 278a191771..c06c51601f 100644 --- a/src/p_3dmidtex.h +++ b/src/p_3dmidtex.h @@ -14,7 +14,7 @@ void P_Start3dMidtexInterpolations(TArray &list, sector_t *sec void P_Attach3dMidtexLinesToSector(sector_t *dest, int lineid, int tag, bool ceiling); bool P_GetMidTexturePosition(const line_t *line, int sideno, fixed_t *ptextop, fixed_t *ptexbot); bool P_Check3dMidSwitch(AActor *actor, line_t *line, int side); -bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, fixed_t &opentop, fixed_t &openbottom); +bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, fixed_t &opentop, fixed_t &openbottom, bool *above); bool P_MoveLinkedSectors(sector_t *sector, int crush, fixed_t move, bool ceiling); void P_StartLinkedSectorInterpolations(TArray &list, sector_t *sector, bool ceiling); diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 63c3f0a6ca..19101bfb81 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -1964,6 +1964,7 @@ DLevelScript::~DLevelScript () { if (localvars != NULL) delete[] localvars; + localvars = NULL; } void DLevelScript::Unlink () @@ -2542,6 +2543,7 @@ enum APROP_ScaleX = 29, APROP_ScaleY = 30, APROP_Dormant = 31, + APROP_Mass = 32, }; // These are needed for ACS's APROP_RenderStyle @@ -2709,7 +2711,7 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value) actor->Score = value; case APROP_NameTag: - actor->Tag = FBehavior::StaticLookupString(value); + actor->SetTag(FBehavior::StaticLookupString(value)); break; case APROP_DamageFactor: @@ -2730,6 +2732,10 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value) actor->scaleY = value; break; + case APROP_Mass: + actor->Mass = value; + break; + default: // do nothing. break; @@ -2795,6 +2801,7 @@ int DLevelScript::GetActorProperty (int tid, int property) case APROP_WaterLevel: return actor->waterlevel; case APROP_ScaleX: return actor->scaleX; case APROP_ScaleY: return actor->scaleY; + case APROP_Mass: return actor->Mass; default: return 0; } @@ -2832,6 +2839,7 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value) case APROP_WaterLevel: case APROP_ScaleX: case APROP_ScaleY: + case APROP_Mass: return (GetActorProperty(tid, property) == value); // Boolean values need to compare to a binary version of value @@ -3052,6 +3060,7 @@ enum EACSFunctions ACSF_GetPolyobjX, ACSF_GetPolyobjY, ACSF_CheckSight, + ACSF_SpawnForced, }; int DLevelScript::SideFromID(int id, int side) @@ -3523,6 +3532,9 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) return 0; } + case ACSF_SpawnForced: + return DoSpawn(args[0], args[1], args[2], args[3], args[4], args[5], true); + default: break; } @@ -6013,18 +6025,17 @@ int DLevelScript::RunScript () sp--; break; - case PCD_CHECKWEAPON: - if (activator == NULL || activator->player == NULL || // Non-players do not have weapons - activator->player->ReadyWeapon == NULL) - { - STACK(1) = 0; - } - else - { - STACK(1) = 0 == stricmp (FBehavior::StaticLookupString (STACK(1)), - activator->player->ReadyWeapon->GetClass()->TypeName.GetChars()); - } - break; + case PCD_CHECKWEAPON: + if (activator == NULL || activator->player == NULL || // Non-players do not have weapons + activator->player->ReadyWeapon == NULL) + { + STACK(1) = 0; + } + else + { + STACK(1) = activator->player->ReadyWeapon->GetClass()->TypeName == FName(FBehavior::StaticLookupString (STACK(1)), true); + } + break; case PCD_SETWEAPON: if (activator == NULL || activator->player == NULL) @@ -6725,9 +6736,18 @@ DLevelScript::DLevelScript (AActor *who, line_t *where, int num, const ScriptPtr script = num; numlocalvars = code->VarCount; localvars = new SDWORD[code->VarCount]; - localvars[0] = arg0; - localvars[1] = arg1; - localvars[2] = arg2; + if (code->VarCount > 0) + { + localvars[0] = arg0; + if (code->VarCount > 1) + { + localvars[1] = arg1; + if (code->VarCount > 2) + { + localvars[2] = arg2; + } + } + } memset (localvars+code->ArgCount, 0, (code->VarCount-code->ArgCount)*sizeof(SDWORD)); pc = module->GetScriptAddress (code); activator = who; diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 2a61f8335d..60db366116 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -44,6 +44,7 @@ #include "thingdef/thingdef.h" #include "d_dehacked.h" #include "g_level.h" +#include "teaminfo.h" #include "gi.h" @@ -308,7 +309,7 @@ bool P_CheckMissileRange (AActor *actor) { fixed_t dist; - if (!P_CheckSight (actor, actor->target, SF_SEEPASTBLOCKEVERYTHING|SF_SEEPASTSHOOTABLELINES)) + if (!P_CheckSight (actor, actor->target, SF_SEEPASTBLOCKEVERYTHING)) return false; if (actor->flags & MF_JUSTHIT) @@ -1150,7 +1151,7 @@ bool P_IsVisible(AActor *lookee, AActor *other, INTBOOL allaround, FLookExParams } // P_CheckSight is by far the most expensive operation in here so let's do it last. - return P_CheckSight(lookee, other, SF_SEEPASTBLOCKEVERYTHING); + return P_CheckSight(lookee, other, SF_SEEPASTSHOOTABLELINES); } //--------------------------------------------------------------------------- @@ -1417,9 +1418,7 @@ AActor *LookForEnemiesInBlock (AActor *lookee, int index, void *extparam) other = NULL; if (link->flags & MF_FRIENDLY) { - if (deathmatch && - lookee->FriendPlayer != 0 && link->FriendPlayer != 0 && - lookee->FriendPlayer != link->FriendPlayer) + if (!lookee->IsFriend(link)) { // This is somebody else's friend, so go after it other = link; @@ -1581,7 +1580,7 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params) } #endif // [SP] If you don't see any enemies in deathmatch, look for players (but only when friend to a specific player.) - if (actor->FriendPlayer == 0) return result; + if (actor->FriendPlayer == 0 && (!teamplay || actor->DesignatedTeam == TEAM_NONE)) return result; if (result || !deathmatch) return true; @@ -1664,10 +1663,8 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params) // We're going to ignore our master, but go after his enemies. if ( actor->flags & MF_FRIENDLY ) { - if ( actor->FriendPlayer == 0 ) - continue; // I have no friends, I will ignore players. - if ( actor->FriendPlayer == player->mo->FriendPlayer ) - continue; // This is my master. + if ( actor->IsFriend(player->mo) ) + continue; } if ((player->mo->flags & MF_SHADOW && !(i_compatflags & COMPATF_INVISIBILITY)) || diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 4a082cff01..b39a4017f5 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1087,6 +1087,21 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage } } + // [RH] Avoid friendly fire if enabled + if (!(flags & DMG_FORCED) && source != NULL && + ((player && player != source->player) || !player) && + target->IsTeammate (source)) + { + if (player) + FriendlyFire = true; + if (damage < TELEFRAG_DAMAGE) + { // Still allow telefragging :-( + damage = (int)((float)damage * level.teamdamage); + if (damage <= 0) + return; + } + } + // // player specific // @@ -1115,17 +1130,6 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage return; } - // [RH] Avoid friendly fire if enabled - if (source != NULL && player != source->player && target->IsTeammate (source)) - { - FriendlyFire = true; - if (damage < TELEFRAG_DAMAGE) - { // Still allow telefragging :-( - damage = (int)((float)damage * level.teamdamage); - if (damage <= 0) - return; - } - } if (!(flags & DMG_NO_ARMOR) && player->mo->Inventory != NULL) { int newdam = damage; diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 1b3f627a4f..88801733f9 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -2473,6 +2473,7 @@ FUNC(LS_Line_SetBlocking) ML_BLOCKEVERYTHING, ML_RAILING, ML_BLOCKUSE, + ML_BLOCKSIGHT, -1 }; diff --git a/src/p_local.h b/src/p_local.h index 2997f31216..7d3c3d14ce 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -232,6 +232,7 @@ struct FLineOpening FTextureID ceilingpic; FTextureID floorpic; bool touchmidtex; + bool abovemidtex; }; void P_LineOpening (FLineOpening &open, AActor *thing, const line_t *linedef, fixed_t x, fixed_t y, fixed_t refx=FIXED_MIN, fixed_t refy=0); @@ -348,6 +349,7 @@ struct FCheckPosition FTextureID ceilingpic; sector_t *ceilingsector; bool touchmidtex; + bool abovemidtex; bool floatok; bool FromPMove; line_t *ceilingline; diff --git a/src/p_map.cpp b/src/p_map.cpp index 725d65824d..49277e7f0e 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -148,10 +148,12 @@ static bool PIT_FindFloorCeiling (line_t *ld, const FBoundingBox &box, FCheckPos tmf.floorz = open.bottom; tmf.floorsector = open.bottomsec; tmf.touchmidtex = open.touchmidtex; + tmf.abovemidtex = open.abovemidtex; } else if (open.bottom == tmf.floorz) { tmf.touchmidtex |= open.touchmidtex; + tmf.abovemidtex |= open.abovemidtex; } if (open.lowfloor < tmf.dropoffz) @@ -250,6 +252,7 @@ void P_FindFloorCeiling (AActor *actor, bool onlyspawnpos) FBoundingBox box(tmf.x, tmf.y, actor->radius); tmf.touchmidtex = false; + tmf.abovemidtex = false; validcount++; FBlockLinesIterator it(box); @@ -262,7 +265,7 @@ void P_FindFloorCeiling (AActor *actor, bool onlyspawnpos) if (tmf.touchmidtex) tmf.dropoffz = tmf.floorz; - if (!onlyspawnpos || (tmf.touchmidtex && (tmf.floorz <= actor->z))) + if (!onlyspawnpos || (tmf.abovemidtex && (tmf.floorz <= actor->z))) { actor->floorz = tmf.floorz; actor->dropoffz = tmf.dropoffz; @@ -314,6 +317,8 @@ bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefr tmf.x = x; tmf.y = y; tmf.z = z; + tmf.touchmidtex = false; + tmf.abovemidtex = false; P_GetFloorCeilingZ(tmf, true); spechit.Clear (); @@ -325,10 +330,14 @@ bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefr FBlockLinesIterator it(box); line_t *ld; + // P_LineOpening requires the thing's z to be the destination ín order to work. + fixed_t savedz = thing->z; + thing->z = z; while ((ld = it.Next())) { PIT_FindFloorCeiling(ld, box, tmf); } + thing->z = savedz; if (tmf.touchmidtex) tmf.dropoffz = tmf.floorz; @@ -731,7 +740,8 @@ bool PIT_CheckLine (line_t *ld, const FBoundingBox &box, FCheckPosition &tm) // so don't mess around with the z-position if (ld->frontsector->floorplane==ld->backsector->floorplane && ld->frontsector->floorplane==tm.thing->Sector->floorplane && - !ld->frontsector->e->XFloor.ffloors.Size() && !ld->backsector->e->XFloor.ffloors.Size()) + !ld->frontsector->e->XFloor.ffloors.Size() && !ld->backsector->e->XFloor.ffloors.Size() && + !open.abovemidtex) { open.bottom=INT_MIN; } @@ -768,11 +778,13 @@ bool PIT_CheckLine (line_t *ld, const FBoundingBox &box, FCheckPosition &tm) tm.floorsector = open.bottomsec; tm.floorpic = open.floorpic; tm.touchmidtex = open.touchmidtex; + tm.abovemidtex = open.abovemidtex; tm.thing->BlockingLine = ld; } else if (open.bottom == tm.floorz) { tm.touchmidtex |= open.touchmidtex; + tm.abovemidtex |= open.abovemidtex; } if (open.lowfloor < tm.dropoffz) @@ -1258,6 +1270,7 @@ bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y, FCheckPosition &tm) tm.ceilingpic = newsec->GetTexture(sector_t::ceiling); tm.ceilingsector = newsec; tm.touchmidtex = false; + tm.abovemidtex = false; //Added by MC: Fill the tmsector. tm.sector = newsec; @@ -2864,7 +2877,8 @@ bool aim_t::AimTraverse3DFloors(const divline_t &trace, intercept_t * in) nextsector=NULL; nexttopplane=nextbottomplane=NULL; - if(li->frontsector->e->XFloor.ffloors.Size() || li->backsector->e->XFloor.ffloors.Size()) + if (li->backsector == NULL) return true; // shouldn't really happen but crashed once for me... + if (li->frontsector->e->XFloor.ffloors.Size() || li->backsector->e->XFloor.ffloors.Size()) { int frontflag; F3DFloor* rover; diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index 9f4ddb39a0..187de226d7 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -212,9 +212,9 @@ void P_LineOpening (FLineOpening &open, AActor *actor, const line_t *linedef, if (actor != NULL && linedef->frontsector != NULL && linedef->backsector != NULL && linedef->flags & ML_3DMIDTEX) { - open.touchmidtex = P_LineOpening_3dMidtex(actor, linedef, open.top, open.bottom); + open.touchmidtex = P_LineOpening_3dMidtex(actor, linedef, open.top, open.bottom, &open.abovemidtex); } - else open.touchmidtex = false; + else open.abovemidtex = open.touchmidtex = false; open.range = open.top - open.bottom; } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 39a17bf763..f52be1fc55 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -299,9 +299,12 @@ void AActor::Serialize (FArchive &arc) << BlockingLine << pushfactor << Species - << Score - << Tag - << lastpush << lastbump + << Score; + if (SaveVersion >= 3113) + { + arc << DesignatedTeam; + } + arc << lastpush << lastbump << PainThreshold << DamageFactor << WeaveIndexXY << WeaveIndexZ @@ -309,6 +312,17 @@ void AActor::Serialize (FArchive &arc) << PoisonDamage << PoisonDuration << PoisonPeriod << ConversationRoot << Conversation; + { + FString tagstr; + if (arc.IsStoring() && Tag != NULL && Tag->Len() > 0) tagstr = *Tag; + arc << tagstr; + if (arc.IsLoading()) + { + if (tagstr.Len() == 0) Tag = NULL; + else Tag = mStringPropertyData.Alloc(tagstr); + } + } + if (arc.IsLoading ()) { touching_sectorlist = NULL; @@ -765,6 +779,7 @@ void AActor::CopyFriendliness (AActor *other, bool changeTarget) flags3 = (flags3 & ~(MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS)) | (other->flags3 & (MF3_NOSIGHTCHECK | MF3_HUNTPLAYERS)); flags4 = (flags4 & ~MF4_NOHATEPLAYERS) | (other->flags4 & MF4_NOHATEPLAYERS); FriendPlayer = other->FriendPlayer; + DesignatedTeam = other->DesignatedTeam; if (changeTarget && other->target != NULL && !(other->target->flags3 & MF3_NOTARGET)) { // LastHeard must be set as well so that A_Look can react to the new target if called @@ -2735,6 +2750,11 @@ void AActor::Tick () //Added by MC: Freeze mode. if (bglobal.freeze || level.flags2 & LEVEL2_FROZEN) { + // Boss cubes shouldn't be accelerated by timefreeze + if (flags6 & MF6_BOSSCUBE) + { + special2++; + } return; } } @@ -2765,6 +2785,11 @@ void AActor::Tick () if (!(flags5 & MF5_NOTIMEFREEZE)) { + // Boss cubes shouldn't be accelerated by timefreeze + if (flags6 & MF6_BOSSCUBE) + { + special2++; + } //Added by MC: Freeze mode. if (bglobal.freeze && !(player && !player->isbot)) { @@ -5286,12 +5311,18 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z, bool AActor::IsTeammate (AActor *other) { - if (!player || !other || !other->player) + if (!other) return false; - if (!deathmatch) + else if (!deathmatch && player && other->player) return true; - if (teamplay && other->player->userinfo.team != TEAM_NONE && - player->userinfo.team == other->player->userinfo.team) + int myTeam = DesignatedTeam; + int otherTeam = other->DesignatedTeam; + if (player) + myTeam = player->userinfo.team; + if (other->player) + otherTeam = other->player->userinfo.team; + if (teamplay && myTeam != TEAM_NONE && + myTeam == otherTeam) { return true; } @@ -5343,6 +5374,11 @@ bool AActor::IsFriend (AActor *other) { if (flags & other->flags & MF_FRIENDLY) { + if (deathmatch && teamplay) + return IsTeammate(other) || + (FriendPlayer != 0 && other->FriendPlayer != 0 && + players[FriendPlayer-1].mo->IsTeammate(players[other->FriendPlayer-1].mo)); + return !deathmatch || FriendPlayer == other->FriendPlayer || FriendPlayer == 0 || @@ -5368,6 +5404,11 @@ bool AActor::IsHostile (AActor *other) // Both monsters are friendly and belong to the same player if applicable. if (flags & other->flags & MF_FRIENDLY) { + if (deathmatch && teamplay) + return !IsTeammate(other) && + !(FriendPlayer != 0 && other->FriendPlayer != 0 && + players[FriendPlayer-1].mo->IsTeammate(players[other->FriendPlayer-1].mo)); + return deathmatch && FriendPlayer != other->FriendPlayer && FriendPlayer !=0 && @@ -5521,11 +5562,13 @@ bool AActor::IsSentient() const } +FSharedStringArena AActor::mStringPropertyData; + const char *AActor::GetTag(const char *def) const { - if (Tag != NAME_None) + if (Tag != NULL) { - const char *tag = Tag.GetChars(); + const char *tag = Tag->GetChars(); if (tag[0] == '$') { return GStrings(tag + 1); @@ -5545,6 +5588,18 @@ const char *AActor::GetTag(const char *def) const } } +void AActor::SetTag(const char *def) +{ + if (def == NULL || *def == 0) + { + Tag = NULL; + } + else + { + Tag = mStringPropertyData.Alloc(def); + } +} + void AActor::ClearCounters() { diff --git a/src/p_sight.cpp b/src/p_sight.cpp index 359b5d4d31..3e699cab1c 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -256,7 +256,7 @@ bool SightCheck::P_SightCheckLine (line_t *ld) } // try to early out the check - if (!ld->backsector || !(ld->flags & ML_TWOSIDED)) + if (!ld->backsector || !(ld->flags & ML_TWOSIDED) || (ld->flags & ML_BLOCKSIGHT)) return false; // stop checking // [RH] don't see past block everything lines diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 72c3cb24c9..1215d0839d 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -874,6 +874,10 @@ public: Flag(ld->flags, ML_BLOCKUSE, key); continue; + case NAME_blocksight: + Flag(ld->flags, ML_BLOCKSIGHT, key); + continue; + default: break; } diff --git a/src/r_things.cpp b/src/r_things.cpp index b612f4f440..5666c3adcc 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -1115,6 +1115,7 @@ void R_InitSkins (void) for (k = 0; k < MAX_SPRITE_FRAMES; ++k) { sprtemp[k].Flip = 0; + sprtemp[k].Voxel = NULL; } maxframe = -1; diff --git a/src/sdl/i_input.cpp b/src/sdl/i_input.cpp index 6e862e0a38..4f933826ef 100644 --- a/src/sdl/i_input.cpp +++ b/src/sdl/i_input.cpp @@ -21,7 +21,7 @@ static void I_CheckGUICapture (); static void I_CheckNativeMouse (); -static bool GUICapture; +bool GUICapture; static bool NativeMouse = true; extern int paused; @@ -36,6 +36,9 @@ EXTERN_CVAR (Bool, fullscreen) extern int WaitingForKey, chatmodeon; extern constate_e ConsoleState; +extern SDL_Surface *cursorSurface; +extern SDL_Rect cursorBlit; + static BYTE KeySymToDIK[SDLK_LAST], DownState[SDLK_LAST]; static WORD DIKToKeySym[256] = @@ -114,6 +117,11 @@ static void I_CheckGUICapture () GUICapture = wantCapt; if (wantCapt) { + int x, y; + SDL_GetMouseState (&x, &y); + cursorBlit.x = x; + cursorBlit.y = y; + FlushDIKState (); memset (DownState, 0, sizeof(DownState)); repeat = !sdl_nokeyrepeat; @@ -260,15 +268,14 @@ static void I_CheckNativeMouse () if (wantNative != NativeMouse) { NativeMouse = wantNative; + SDL_ShowCursor (wantNative ? cursorSurface == NULL : 0); if (wantNative) { - SDL_ShowCursor (1); SDL_WM_GrabInput (SDL_GRAB_OFF); FlushDIKState (KEY_MOUSE1, KEY_MOUSE8); } else { - SDL_ShowCursor (0); SDL_WM_GrabInput (SDL_GRAB_ON); CenterMouse (); } @@ -299,54 +306,68 @@ void MessagePump (const SDL_Event &sev) case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: + case SDL_MOUSEMOTION: if (!GUICapture || sev.button.button == 4 || sev.button.button == 5) { - event.type = sev.type == SDL_MOUSEBUTTONDOWN ? EV_KeyDown : EV_KeyUp; - /* These button mappings work with my Gentoo system using the - * evdev driver and a Logitech MX510 mouse. Whether or not they - * carry over to other Linux systems, I have no idea, but I sure - * hope so. (Though buttons 11 and 12 are kind of useless, since - * they also trigger buttons 4 and 5.) - */ - switch (sev.button.button) + if(sev.type != SDL_MOUSEMOTION) { - case 1: event.data1 = KEY_MOUSE1; break; - case 2: event.data1 = KEY_MOUSE3; break; - case 3: event.data1 = KEY_MOUSE2; break; - case 4: event.data1 = KEY_MWHEELUP; break; - case 5: event.data1 = KEY_MWHEELDOWN; break; - case 6: event.data1 = KEY_MOUSE4; break; /* dunno; not generated by my mouse */ - case 7: event.data1 = KEY_MOUSE5; break; /* ditto */ - case 8: event.data1 = KEY_MOUSE4; break; - case 9: event.data1 = KEY_MOUSE5; break; - case 10: event.data1 = KEY_MOUSE6; break; - case 11: event.data1 = KEY_MOUSE7; break; - case 12: event.data1 = KEY_MOUSE8; break; - default: printf("SDL mouse button %s %d\n", - sev.type == SDL_MOUSEBUTTONDOWN ? "down" : "up", sev.button.button); break; - } - if (event.data1 != 0) - { - //DIKState[ActiveDIKState][event.data1] = (event.type == EV_KeyDown); - if (event.data1 == KEY_MWHEELUP || event.data1 == KEY_MWHEELDOWN) + event.type = sev.type == SDL_MOUSEBUTTONDOWN ? EV_KeyDown : EV_KeyUp; + /* These button mappings work with my Gentoo system using the + * evdev driver and a Logitech MX510 mouse. Whether or not they + * carry over to other Linux systems, I have no idea, but I sure + * hope so. (Though buttons 11 and 12 are kind of useless, since + * they also trigger buttons 4 and 5.) + */ + switch (sev.button.button) { - WheelMoved(&event); + case 1: event.data1 = KEY_MOUSE1; break; + case 2: event.data1 = KEY_MOUSE3; break; + case 3: event.data1 = KEY_MOUSE2; break; + case 4: event.data1 = KEY_MWHEELUP; break; + case 5: event.data1 = KEY_MWHEELDOWN; break; + case 6: event.data1 = KEY_MOUSE4; break; /* dunno; not generated by my mouse */ + case 7: event.data1 = KEY_MOUSE5; break; /* ditto */ + case 8: event.data1 = KEY_MOUSE4; break; + case 9: event.data1 = KEY_MOUSE5; break; + case 10: event.data1 = KEY_MOUSE6; break; + case 11: event.data1 = KEY_MOUSE7; break; + case 12: event.data1 = KEY_MOUSE8; break; + default: printf("SDL mouse button %s %d\n", + sev.type == SDL_MOUSEBUTTONDOWN ? "down" : "up", sev.button.button); break; } - else + if (event.data1 != 0) { - D_PostEvent(&event); + //DIKState[ActiveDIKState][event.data1] = (event.type == EV_KeyDown); + if (event.data1 == KEY_MWHEELUP || event.data1 == KEY_MWHEELDOWN) + { + WheelMoved(&event); + } + else + { + D_PostEvent(&event); + } } } } - else if (sev.button.button >= 1 && sev.button.button <= 3) + else if (sev.type == SDL_MOUSEMOTION || (sev.button.button >= 1 && sev.button.button <= 3)) { + int x, y; + SDL_GetMouseState (&x, &y); + + cursorBlit.x = event.data1 = x; + cursorBlit.y = event.data2 = y; event.type = EV_GUI_Event; - event.subtype = sev.type == SDL_MOUSEBUTTONDOWN ? EV_GUI_LButtonDown : EV_GUI_LButtonUp; - event.subtype += (sev.button.button - 1) * 3; + if(sev.type == SDL_MOUSEMOTION) + event.subtype = EV_GUI_MouseMove; + else + { + event.subtype = sev.type == SDL_MOUSEBUTTONDOWN ? EV_GUI_LButtonDown : EV_GUI_LButtonUp; + event.subtype += (sev.button.button - 1) * 3; + } D_PostEvent(&event); } break; - + case SDL_KEYDOWN: case SDL_KEYUP: if (sev.key.keysym.sym >= SDLK_LAST) diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index af717324e1..49628eef47 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -60,6 +60,9 @@ #include "i_system.h" #include "c_dispatch.h" #include "templates.h" +#include "v_palette.h" +#include "textures.h" +#include "bitmap.h" #include "stats.h" #include "hardware.h" @@ -830,7 +833,39 @@ unsigned int I_MakeRNGSeed() return seed; } +SDL_Surface *cursorSurface = NULL; +SDL_Rect cursorBlit = {0, 0, 32, 32}; bool I_SetCursor(FTexture *cursorpic) { - return false; + if (cursorpic != NULL && cursorpic->UseType != FTexture::TEX_Null) + { + // Must be no larger than 32x32. + if (cursorpic->GetWidth() > 32 || cursorpic->GetHeight() > 32) + { + return false; + } + + if (cursorSurface == NULL) + cursorSurface = SDL_CreateRGBSurface (0, 32, 32, 32, MAKEARGB(0,255,0,0), MAKEARGB(0,0,255,0), MAKEARGB(0,0,0,255), MAKEARGB(255,0,0,0)); + + SDL_ShowCursor(0); + SDL_LockSurface(cursorSurface); + BYTE buffer[32*32*4]; + memset(buffer, 0, 32*32*4); + FBitmap bmp(buffer, 32*4, 32, 32); + cursorpic->CopyTrueColorPixels(&bmp, 0, 0); + memcpy(cursorSurface->pixels, bmp.GetPixels(), 32*32*4); + SDL_UnlockSurface(cursorSurface); + } + else + { + SDL_ShowCursor(1); + + if (cursorSurface != NULL) + { + SDL_FreeSurface(cursorSurface); + cursorSurface = NULL; + } + } + return true; } diff --git a/src/sdl/sdlvideo.cpp b/src/sdl/sdlvideo.cpp index b028aafad7..efff947057 100644 --- a/src/sdl/sdlvideo.cpp +++ b/src/sdl/sdlvideo.cpp @@ -76,6 +76,9 @@ void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, in // EXTERNAL DATA DECLARATIONS ---------------------------------------------- extern IVideo *Video; +extern SDL_Surface *cursorSurface; +extern SDL_Rect cursorBlit; +extern bool GUICapture; EXTERN_CVAR (Float, Gamma) @@ -404,7 +407,13 @@ void SDLFB::Update () } SDL_UnlockSurface (Screen); - + + if (cursorSurface != NULL && GUICapture) + { + // SDL requires us to draw a surface to get true color cursors. + SDL_BlitSurface(cursorSurface, NULL, Screen, &cursorBlit); + } + SDLFlipCycles.Clock(); SDL_Flip (Screen); SDLFlipCycles.Unclock(); diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index a40c49467f..1717a77e16 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2037,6 +2037,21 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetScale) self->scaleY = scaley ? scaley : scalex; } +//=========================================================================== +// +// A_SetMass(int mass) +// +// Sets the actor's mass. +// +//=========================================================================== +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetMass) +{ + ACTION_PARAM_START(2); + ACTION_PARAM_INT(mass, 0); + + self->Mass = mass; +} + //=========================================================================== // // A_SpawnDebris diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index 5f7238e296..f31753b1be 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -61,6 +61,7 @@ DEFINE_MEMBER_VARIABLE(args, AActor) DEFINE_MEMBER_VARIABLE(ceilingz, AActor) DEFINE_MEMBER_VARIABLE(floorz, AActor) DEFINE_MEMBER_VARIABLE(health, AActor) +DEFINE_MEMBER_VARIABLE(Mass, AActor) DEFINE_MEMBER_VARIABLE(pitch, AActor) DEFINE_MEMBER_VARIABLE(special, AActor) DEFINE_MEMBER_VARIABLE(special1, AActor) diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index f7221c4350..e7601ba746 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -67,6 +67,7 @@ #include "r_translate.h" #include "a_morph.h" #include "colormatcher.h" +#include "teaminfo.h" //========================================================================== @@ -299,7 +300,7 @@ DEFINE_PROPERTY(skip_super, 0, Actor) DEFINE_PROPERTY(tag, S, Actor) { PROP_STRING_PARM(str, 0); - defaults->Tag = str; + defaults->SetTag(str); } //========================================================================== @@ -1120,6 +1121,17 @@ DEFINE_PROPERTY(activation, N, Actor) defaults->activationtype = val; } +//========================================================================== +// +//========================================================================== +DEFINE_PROPERTY(designatedteam, I, Actor) +{ + PROP_INT_PARM(val, 0); + if(val < 0 || (val >= (signed) Teams.Size() && val != TEAM_NONE)) + I_Error("Invalid team designation.\n"); + defaults->DesignatedTeam = val; +} + //========================================================================== // // Special inventory properties diff --git a/src/version.h b/src/version.h index 5edcb71087..bb2e096ac9 100644 --- a/src/version.h +++ b/src/version.h @@ -75,7 +75,7 @@ // SAVESIG should match SAVEVER. // MINSAVEVER is the minimum level snapshot version that can be loaded. -#define MINSAVEVER 3085 +#define MINSAVEVER 3100 #if SVN_REVISION_NUMBER < MINSAVEVER // If we don't know the current revision write something very high to ensure that diff --git a/wadsrc/CMakeLists.txt b/wadsrc/CMakeLists.txt index f787896444..19a210abc6 100644 --- a/wadsrc/CMakeLists.txt +++ b/wadsrc/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required( VERSION 2.4 ) add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 - COMMAND ${CMAKE_BINARY_DIR}/tools/zipdir/zipdir -udf ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static ${CMAKE_CURRENT_BINARY_DIR}/generated + COMMAND ${CMAKE_BINARY_DIR}/tools/zipdir/zipdir -udf ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static DEPENDS zipdir ${CMAKE_CURRENT_SOURCE_DIR}/static ) add_custom_target( pk3 ALL diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index f8dd3d863b..5e71ac555c 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -21,6 +21,7 @@ ACTOR Actor native //: Thinker PushFactor 0.25 WeaveIndexXY 0 WeaveIndexZ 16 + DesignatedTeam 255 // Variables for the expression evaluator // NOTE: fixed_t and angle_t are only used here to ensure proper conversion @@ -32,6 +33,7 @@ ACTOR Actor native //: Thinker native fixed_t ceilingz; native fixed_t floorz; native int health; + native int mass; native angle_t pitch; native int special; native int tid; @@ -207,6 +209,7 @@ ACTOR Actor native //: Thinker action native A_FadeOut(float reduce = 0.1, bool remove = true); action native A_FadeTo(float target, float amount = 0.1, bool remove = false); action native A_SetScale(float scalex, float scaley = 0); + action native A_SetMass(int mass); action native A_SpawnDebris(class spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1); action native A_CheckSight(state label); action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false); diff --git a/wadsrc/static/actors/raven/minotaur.txt b/wadsrc/static/actors/raven/minotaur.txt index edce0d8137..81d20efebd 100644 --- a/wadsrc/static/actors/raven/minotaur.txt +++ b/wadsrc/static/actors/raven/minotaur.txt @@ -122,6 +122,8 @@ ACTOR MinotaurFriend : Minotaur native MNTR A 15 A_SetTranslucent(0.66, 0) MNTR A 3 A_SetTranslucent(1, 0) Goto Super::Spawn + Idle: + Goto Super::Spawn Death: Goto FadeOut } diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 746b68ed29..5d448fd261 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -526,12 +526,9 @@ OptionMenu "MouseOptions" { Title "MOUSE OPTIONS" Option "Enable mouse", "use_mouse", "YesNo" - IfOption(Windows) // GUI mouse not operable in SDL interface right now. - { - Option "Enable mouse in menus", "m_use_mouse", "MenuMouse", "use_mouse" - Option "Show back button", "m_show_backbutton", "Corners", "use_mouse" - Option "Cursor", "vid_cursor", "Cursors" - } + Option "Enable mouse in menus", "m_use_mouse", "MenuMouse", "use_mouse" + Option "Show back button", "m_show_backbutton", "Corners", "use_mouse" + Option "Cursor", "vid_cursor", "Cursors" StaticText "" Slider "Overall sensitivity", "mouse_sensitivity", 0.5, 2.5, 0.1 Option "Prescale mouse movement", "m_noprescale", "NoYes" diff --git a/wadsrc/wadsrc.vcproj b/wadsrc/wadsrc.vcproj index a79a19c5b0..1baa29aa59 100644 --- a/wadsrc/wadsrc.vcproj +++ b/wadsrc/wadsrc.vcproj @@ -37,7 +37,7 @@