diff -Nru doomsday-server-2.3.2.3866+bionic/debian/changelog doomsday-server-2.3.2.3869+bionic/debian/changelog --- doomsday-server-2.3.2.3866+bionic/debian/changelog 2021-08-07 12:02:14.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/debian/changelog 2021-08-07 12:02:16.000000000 +0000 @@ -1,8 +1,7 @@ -doomsday-server (2.3.2.3866+bionic) bionic; urgency=medium +doomsday-server (2.3.2.3869+bionic) bionic; urgency=medium - * New release: Candidate build 3866. - * Added Thing.mapSpotNum() for querying source map spot - * Cleanup - * Fixed updating visAngle of immobile things + * New release: Candidate build 3869. + * Update mobj visAngle together with angle + * Set mobj's map spot number at creation - -- Jaakko Keränen (skyjake) Wed, 04 Aug 2021 19:36:05 +0300 + -- Jaakko Keränen (skyjake) Sat, 07 Aug 2021 14:58:05 +0300 diff -Nru doomsday-server-2.3.2.3866+bionic/debian/rules doomsday-server-2.3.2.3869+bionic/debian/rules --- doomsday-server-2.3.2.3866+bionic/debian/rules 2021-08-07 12:02:14.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/debian/rules 2021-08-07 12:02:16.000000000 +0000 @@ -8,7 +8,7 @@ cd builddir && QTCHOOSER_RUNTOOL=qmake QT_SELECT=5 cmake \ -DQMAKE=qtchooser \ -DCMAKE_BUILD_TYPE=Release \ - -DDENG_BUILD=3866 \ + -DDENG_BUILD=3869 \ -DCMAKE_CXX_FLAGS=-std=c++11 \ -DDENG_ENABLE_SDK=OFF \ -DDENG_ENABLE_COTIRE=OFF -DDENG_ENABLE_GUI=OFF \ diff -Nru doomsday-server-2.3.2.3866+bionic/doomsday/apps/client/src/world/base/bindings_world.cpp doomsday-server-2.3.2.3869+bionic/doomsday/apps/client/src/world/base/bindings_world.cpp --- doomsday-server-2.3.2.3866+bionic/doomsday/apps/client/src/world/base/bindings_world.cpp 2021-08-04 16:36:05.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/doomsday/apps/client/src/world/base/bindings_world.cpp 2021-08-07 11:58:05.000000000 +0000 @@ -87,6 +87,7 @@ { mobj_t &mo = ClientServerWorld::contextMobj(ctx); mo.angle = angle_t(args.at(0)->asNumber() / 360.0 * ANGLE_MAX); + mo.visAngle = mo.angle >> 16; return nullptr; } diff -Nru doomsday-server-2.3.2.3866+bionic/doomsday/apps/client/src/world/base/p_mobj.cpp doomsday-server-2.3.2.3869+bionic/doomsday/apps/client/src/world/base/p_mobj.cpp --- doomsday-server-2.3.2.3866+bionic/doomsday/apps/client/src/world/base/p_mobj.cpp 2021-08-04 16:36:05.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/doomsday/apps/client/src/world/base/p_mobj.cpp 2021-08-07 11:58:05.000000000 +0000 @@ -129,7 +129,7 @@ mob->height = height; mob->ddFlags = ddflags; mob->lumIdx = -1; - mob->mapSpotNum = -1; + mob->mapSpotNum = Mobj_Map(*mob).currentMapSpot(); mob->thinker.function = function; Mobj_Map(*mob).thinkers().add(mob->thinker); diff -Nru doomsday-server-2.3.2.3866+bionic/doomsday/apps/libdoomsday/include/doomsday/world/map.h doomsday-server-2.3.2.3869+bionic/doomsday/apps/libdoomsday/include/doomsday/world/map.h --- doomsday-server-2.3.2.3866+bionic/doomsday/apps/libdoomsday/include/doomsday/world/map.h 2021-08-04 16:36:05.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/doomsday/apps/libdoomsday/include/doomsday/world/map.h 2021-08-07 11:58:05.000000000 +0000 @@ -84,7 +84,21 @@ virtual void deserializeInternalState(de::Reader &from, IThinkerMapping const &); DENG2_CAST_METHODS() - + + /** + * When map objects are being created, they will be associated with the map spot number + * specified with this method. @a mapSpotNum should be set to -1 to disassociate further + * spawning from any map spot. + * + * This Map-wide value exists because the map object creation APIs do not take a map spot + * as argument, and adding this argument would have an impact on many functions. Also, mobj + * creation is libdoomsday's responsibility, while only the game knows when map spots are + * being spawned. + */ + void setCurrentMapSpot(int mapSpotNum); + + int currentMapSpot(void); + public: /// Notified when the map is about to be deleted. DENG2_DEFINE_AUDIENCE2(Deletion, void mapBeingDeleted(BaseMap const &map)) diff -Nru doomsday-server-2.3.2.3866+bionic/doomsday/apps/libdoomsday/src/world/map.cpp doomsday-server-2.3.2.3869+bionic/doomsday/apps/libdoomsday/src/world/map.cpp --- doomsday-server-2.3.2.3866+bionic/doomsday/apps/libdoomsday/src/world/map.cpp 2021-08-04 16:36:05.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/doomsday/apps/libdoomsday/src/world/map.cpp 2021-08-07 11:58:05.000000000 +0000 @@ -29,6 +29,7 @@ { EntityDatabase entityDatabase; res::MapManifest *manifest = nullptr; ///< Not owned, may be @c nullptr. + int currentMapSpotNum = -1; Impl(Public *i) : Base(i) {} @@ -102,4 +103,14 @@ void BaseMap::deserializeInternalState(Reader &, IThinkerMapping const &) {} +void BaseMap::setCurrentMapSpot(int mapSpotNum) +{ + d->currentMapSpotNum = mapSpotNum; +} + +int BaseMap::currentMapSpot(void) +{ + return d->currentMapSpotNum; +} + } // namespace world diff -Nru doomsday-server-2.3.2.3866+bionic/doomsday/apps/plugins/common/src/world/p_mapsetup.cpp doomsday-server-2.3.2.3869+bionic/doomsday/apps/plugins/common/src/world/p_mapsetup.cpp --- doomsday-server-2.3.2.3866+bionic/doomsday/apps/plugins/common/src/world/p_mapsetup.cpp 2021-08-04 16:36:05.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/doomsday/apps/plugins/common/src/world/p_mapsetup.cpp 2021-08-07 11:58:05.000000000 +0000 @@ -25,6 +25,8 @@ #include #include +#include +#include #include #include @@ -569,9 +571,12 @@ static void spawnMapObjects() { + auto &map = World::get().map(); + for(uint i = 0; i < numMapSpots; ++i) { mapspot_t const *spot = &mapSpots[i]; + map.setCurrentMapSpot(i); // Not all map spots spawn mobjs on map load. if(!checkMapSpotAutoSpawn(spot)) @@ -601,7 +606,7 @@ if(mobj_t *mo = P_SpawnMobj(type, spot->origin, spot->angle, spot->flags)) { - mo->mapSpotNum = i; + DE_ASSERT(mo->mapSpotNum == i); if(mo->tics > 0) mo->tics = 1 + (P_Random() % mo->tics); @@ -674,6 +679,8 @@ } #endif + map.setCurrentMapSpot(-1); + #if __JHEXEN__ P_CreateTIDList(); #endif diff -Nru doomsday-server-2.3.2.3866+bionic/doomsday/doc/doomsday.6 doomsday-server-2.3.2.3869+bionic/doomsday/doc/doomsday.6 --- doomsday-server-2.3.2.3866+bionic/doomsday/doc/doomsday.6 2021-08-04 16:36:05.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/doomsday/doc/doomsday.6 2021-08-07 11:58:05.000000000 +0000 @@ -1,5 +1,5 @@ .\" manual page generated by Amethyst (mdoc+tbl) -.Dd elokuuta 4, 2021 +.Dd elokuuta 7, 2021 .Os .Dt "DOOMSDAY" 6 .Sh NAME diff -Nru doomsday-server-2.3.2.3866+bionic/doomsday/doc/doomsday-server.6 doomsday-server-2.3.2.3869+bionic/doomsday/doc/doomsday-server.6 --- doomsday-server-2.3.2.3866+bionic/doomsday/doc/doomsday-server.6 2021-08-04 16:36:05.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/doomsday/doc/doomsday-server.6 2021-08-07 11:58:05.000000000 +0000 @@ -1,5 +1,5 @@ .\" manual page generated by Amethyst (mdoc+tbl) -.Dd elokuuta 4, 2021 +.Dd elokuuta 7, 2021 .Os .Dt "DOOMSDAY-SERVER" 6 .Sh NAME diff -Nru doomsday-server-2.3.2.3866+bionic/doomsday/doc/doomsday-shell-text.6 doomsday-server-2.3.2.3869+bionic/doomsday/doc/doomsday-shell-text.6 --- doomsday-server-2.3.2.3866+bionic/doomsday/doc/doomsday-shell-text.6 2021-08-04 16:36:05.000000000 +0000 +++ doomsday-server-2.3.2.3869+bionic/doomsday/doc/doomsday-shell-text.6 2021-08-07 11:58:05.000000000 +0000 @@ -1,5 +1,5 @@ .\" manual page generated by Amethyst (mdoc+tbl) -.Dd elokuuta 4, 2021 +.Dd elokuuta 7, 2021 .Os .Dt "DOOMSDAY-SHELL-TEXT" 6 .Sh NAME