gzdoom-last-svn/src/d_netinfo.cpp

879 lines
20 KiB
C++
Raw Normal View History

/*
** d_netinfo.cpp
** Manages transport of user and "server" cvars across a network
**
**---------------------------------------------------------------------------
** Copyright 1998-2006 Randy Heit
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** 1. Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**---------------------------------------------------------------------------
**
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "doomtype.h"
#include "doomdef.h"
#include "doomstat.h"
#include "d_netinf.h"
#include "d_net.h"
#include "d_protocol.h"
#include "d_player.h"
#include "c_dispatch.h"
#include "v_palette.h"
#include "v_video.h"
#include "i_system.h"
#include "r_state.h"
#include "sbar.h"
#include "gi.h"
#include "m_random.h"
#include "teaminfo.h"
#include "r_data/r_translate.h"
#include "templates.h"
Update to ZDoom r1433: - Fixed: Untranslated colors in fonts had an alpha value of 0 but need 255. - Fixed: The Doom status bar's ammo display may not use the INDEXFONT for the alternative HUD. Instead it has to create a separate one out of the STYSNUM characters. - Fixed: skins can not be sorted for binary search because the player class code depends on the original indices. - Fixed: P_StartConversation set the global dialog node variable for all players, not just the consoleplayer. - Fixed: AWeapon::PickupForAmmo assumed that any weapon having a secondary ammo type also has a primary one. - Bumped netgame, demo and min demo version for the weapon slot changes. - changed weapon slots to be stored per player. Information is now transmitted across the network so that all machines know each player's current weapon configuration so that it can be used by cheats or HUD display routines. - fixed: level_info_t::mapbg was not initialized - Fixed: Player names and chat macros that end with incomplete \c escapes now have those escapes stripped before printing so that they do not merge with subsequent text. - Fixed: The CHARFORMAT structure that is used to set the color in a Windows Rich Edit control was not fully initialized resulting in incorrect colors being set. - Moved default weapon slot assignments into the player classes. Weapon.SlotNumber is now used solely for mods that want to add new weapons without completely redoing the player's arsenal. Restored some config-based weapon slot customization, though slots are no longer automatically saved to the config and section names have changed slightly. However, unlike before, config slots are now the definitive word on slot assignments and cannot be overridden by any other files loaded. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@302 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-21 17:07:32 +00:00
#include "cmdlib.h"
#include "farchive.h"
static FRandom pr_pickteam ("PickRandomTeam");
extern bool st_firsttime;
EXTERN_CVAR (Bool, teamplay)
CVAR (Float, autoaim, 5000.f, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (String, name, "Player", CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Color, color, 0x40cf00, CVAR_USERINFO | CVAR_ARCHIVE);
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
CVAR (Int, colorset, 0, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (String, skin, "base", CVAR_USERINFO | CVAR_ARCHIVE);
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
CVAR (Int, team, TEAM_NONE, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (String, gender, "male", CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Bool, neverswitchonpickup, false, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Float, movebob, 0.25f, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (Float, stillbob, 0.f, CVAR_USERINFO | CVAR_ARCHIVE);
CVAR (String, playerclass, "Fighter", CVAR_USERINFO | CVAR_ARCHIVE);
enum
{
INFO_Name,
INFO_Autoaim,
INFO_Color,
INFO_Skin,
INFO_Team,
INFO_Gender,
INFO_NeverSwitchOnPickup,
INFO_MoveBob,
INFO_StillBob,
INFO_PlayerClass,
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
INFO_ColorSet,
};
const char *GenderNames[3] = { "male", "female", "other" };
static const char *UserInfoStrings[] =
{
"name",
"autoaim",
"color",
"skin",
"team",
"gender",
"neverswitchonpickup",
"movebob",
"stillbob",
"playerclass",
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
"colorset",
NULL
};
// Replace \ with %/ and % with %%
FString D_EscapeUserInfo (const char *str)
{
FString ret;
for (; *str != '\0'; ++str)
{
if (*str == '\\')
{
ret << '%' << '/';
}
else if (*str == '%')
{
ret << '%' << '%';
}
else
{
ret << *str;
}
}
return ret;
}
// Replace %/ with \ and %% with %
FString D_UnescapeUserInfo (const char *str, size_t len)
{
const char *end = str + len;
FString ret;
while (*str != '\0' && str < end)
{
if (*str == '%')
{
if (*(str + 1) == '/')
{
ret << '\\';
str += 2;
continue;
}
else if (*(str + 1) == '%')
{
str++;
}
}
ret << *str++;
}
return ret;
}
int D_GenderToInt (const char *gender)
{
if (!stricmp (gender, "female"))
return GENDER_FEMALE;
else if (!stricmp (gender, "other") || !stricmp (gender, "cyborg"))
return GENDER_NEUTER;
else
return GENDER_MALE;
}
int D_PlayerClassToInt (const char *classname)
{
if (PlayerClasses.Size () > 1)
{
for (unsigned int i = 0; i < PlayerClasses.Size (); ++i)
{
const PClass *type = PlayerClasses[i].Type;
if (stricmp (type->Meta.GetMetaString (APMETA_DisplayName), classname) == 0)
{
return i;
}
}
return -1;
}
else
{
return 0;
}
}
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
void D_GetPlayerColor (int player, float *h, float *s, float *v, FPlayerColorSet **set)
{
userinfo_t *info = &players[player].userinfo;
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
FPlayerColorSet *colorset = NULL;
int color;
if (players[player].mo != NULL)
{
colorset = P_GetPlayerColorSet(players[player].mo->GetClass()->TypeName, info->colorset);
}
if (colorset != NULL)
{
color = GPalette.BaseColors[GPalette.Remap[colorset->RepresentativeColor]];
}
else
{
color = info->color;
}
RGBtoHSV (RPART(color)/255.f, GPART(color)/255.f, BPART(color)/255.f,
h, s, v);
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (teamplay && TeamLibrary.IsValidTeam(info->team) && !Teams[info->team].GetAllowCustomPlayerColor ())
{
// In team play, force the player to use the team's hue
// and adjust the saturation and value so that the team
// hue is visible in the final color.
float ts, tv;
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
int tcolor = Teams[info->team].GetPlayerColor ();
RGBtoHSV (RPART(tcolor)/255.f, GPART(tcolor)/255.f, BPART(tcolor)/255.f,
h, &ts, &tv);
*s = clamp(ts + *s * 0.15f - 0.075f, 0.f, 1.f);
*v = clamp(tv + *v * 0.5f - 0.25f, 0.f, 1.f);
}
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
if (set != NULL)
{
*set = colorset;
}
}
// Find out which teams are present. If there is only one,
// then another team should be chosen at random.
//
// Otherwise, join whichever team has fewest players. If
// teams are tied for fewest players, pick one of those
// at random.
void D_PickRandomTeam (int player)
{
static char teamline[8] = "\\team\\X";
BYTE *foo = (BYTE *)teamline;
teamline[6] = (char)D_PickRandomTeam() + '0';
D_ReadUserInfoStrings (player, &foo, teamplay);
}
int D_PickRandomTeam ()
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
for (unsigned int i = 0; i < Teams.Size (); i++)
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
Teams[i].m_iPresent = 0;
Teams[i].m_iTies = 0;
}
int numTeams = 0;
int team;
for (int i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i])
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (TeamLibrary.IsValidTeam (players[i].userinfo.team))
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (Teams[players[i].userinfo.team].m_iPresent++ == 0)
{
numTeams++;
}
}
}
}
if (numTeams < 2)
{
do
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
team = pr_pickteam() % Teams.Size ();
} while (Teams[team].m_iPresent != 0);
}
else
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
int lowest = INT_MAX, lowestTie = 0;
unsigned int i;
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
for (i = 0; i < Teams.Size (); ++i)
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (Teams[i].m_iPresent > 0)
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (Teams[i].m_iPresent < lowest)
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
lowest = Teams[i].m_iPresent;
lowestTie = 0;
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
Teams[0].m_iTies = i;
}
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
else if (Teams[i].m_iPresent == lowest)
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
Teams[++lowestTie].m_iTies = i;
}
}
}
if (lowestTie == 0)
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
team = Teams[0].m_iTies;
}
else
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
team = Teams[pr_pickteam() % (lowestTie+1)].m_iTies;
}
}
return team;
}
static void UpdateTeam (int pnum, int team, bool update)
{
userinfo_t *info = &players[pnum].userinfo;
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if ((dmflags2 & DF2_NO_TEAM_SWITCH) && (alwaysapplydmflags || deathmatch) && TeamLibrary.IsValidTeam (info->team))
{
Printf ("Team changing has been disabled!\n");
return;
}
int oldteam;
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (!TeamLibrary.IsValidTeam (team))
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
team = TEAM_NONE;
}
oldteam = info->team;
info->team = team;
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (teamplay && !TeamLibrary.IsValidTeam (info->team))
{ // Force players onto teams in teamplay mode
info->team = D_PickRandomTeam ();
}
if (update && oldteam != info->team)
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (TeamLibrary.IsValidTeam (info->team))
Printf ("%s joined the %s team\n", info->netname, Teams[info->team].GetName ());
else
Printf ("%s is now a loner\n", info->netname);
}
// Let the player take on the team's color
R_BuildPlayerTranslation (pnum);
if (StatusBar != NULL && StatusBar->GetPlayer() == pnum)
{
StatusBar->AttachToPlayer (&players[pnum]);
}
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (!TeamLibrary.IsValidTeam (info->team))
info->team = TEAM_NONE;
}
int D_GetFragCount (player_t *player)
{
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (!teamplay || !TeamLibrary.IsValidTeam (player->userinfo.team))
{
return player->fragcount;
}
else
{
// Count total frags for this player's team
const int team = player->userinfo.team;
int count = 0;
for (int i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i] && players[i].userinfo.team == team)
{
count += players[i].fragcount;
}
}
return count;
}
}
void D_SetupUserInfo ()
{
int i;
userinfo_t *coninfo = &players[consoleplayer].userinfo;
for (i = 0; i < MAXPLAYERS; i++)
memset (&players[i].userinfo, 0, sizeof(userinfo_t));
strncpy (coninfo->netname, name, MAXPLAYERNAME);
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
if (teamplay && !TeamLibrary.IsValidTeam (team))
{
coninfo->team = D_PickRandomTeam ();
}
else
{
coninfo->team = team;
}
if (autoaim > 35.f || autoaim < 0.f)
{
coninfo->aimdist = ANGLE_1*35;
}
else
{
coninfo->aimdist = abs ((int)(autoaim * (float)ANGLE_1));
}
coninfo->color = color;
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
coninfo->colorset = colorset;
coninfo->skin = R_FindSkin (skin, 0);
coninfo->gender = D_GenderToInt (gender);
coninfo->neverswitch = neverswitchonpickup;
coninfo->MoveBob = (fixed_t)(65536.f * movebob);
coninfo->StillBob = (fixed_t)(65536.f * stillbob);
coninfo->PlayerClass = D_PlayerClassToInt (playerclass);
R_BuildPlayerTranslation (consoleplayer);
}
void D_UserInfoChanged (FBaseCVar *cvar)
{
UCVarValue val;
FString escaped_val;
char foo[256];
if (cvar == &autoaim)
{
if (autoaim < 0.0f)
{
autoaim = 0.0f;
return;
}
else if (autoaim > 5000.0f)
{
autoaim = 5000.f;
return;
}
}
val = cvar->GetGenericRep (CVAR_String);
escaped_val = D_EscapeUserInfo(val.String);
if (4 + strlen(cvar->GetName()) + escaped_val.Len() > 256)
I_Error ("User info descriptor too big");
Update to ZDoom r1083. Not fully tested yet! - Converted most sprintf (and all wsprintf) calls to either mysnprintf or FStrings, depending on the situation. - Changed the strings in the wbstartstruct to be FStrings. - Changed myvsnprintf() to output nothing if count is greater than INT_MAX. This is so that I can use a series of mysnprintf() calls and advance the pointer for each one. Once the pointer goes beyond the end of the buffer, the count will go negative, but since it's an unsigned type it will be seen as excessively huge instead. This should not be a problem, as there's no reason for ZDoom to be using text buffers larger than 2 GB anywhere. - Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig(). - Changed CalcMapName() to return an FString instead of a pointer to a static buffer. - Changed startmap in d_main.cpp into an FString. - Changed CheckWarpTransMap() to take an FString& as the first argument. - Changed d_mapname in g_level.cpp into an FString. - Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an FString. - Fixed: The MAPINFO parser wrote into the string buffer to construct a map name when given a Hexen map number. This was fine with the old scanner code, but only a happy coincidence prevents it from crashing with the new code. - Added the 'B' conversion specifier to StringFormat::VWorker() for printing binary numbers. - Added CMake support for building with MinGW, MSYS, and NMake. Linux support is probably broken until I get around to booting into Linux again. Niceties provided over the existing Makefiles they're replacing: * All command-line builds can use the same build system, rather than having a separate one for MinGW and another for Linux. * Microsoft's NMake tool is supported as a target. * Progress meters. * Parallel makes work from a fresh checkout without needing to be primed first with a single-threaded make. * Porting to other architectures should be simplified, whenever that day comes. - Replaced the makewad tool with zipdir. This handles the dependency tracking itself instead of generating an external makefile to do it, since I couldn't figure out how to generate a makefile with an external tool and include it with a CMake-generated makefile. Where makewad used a master list of files to generate the package file, zipdir just zips the entire contents of one or more directories. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@138 b0f79afe-0144-0410-b225-9a4edf0717df
2008-07-23 18:35:55 +00:00
mysnprintf (foo, countof(foo), "\\%s\\%s", cvar->GetName(), escaped_val.GetChars());
Net_WriteByte (DEM_UINFCHANGED);
Net_WriteString (foo);
}
static const char *SetServerVar (char *name, ECVarType type, BYTE **stream, bool singlebit)
{
FBaseCVar *var = FindCVar (name, NULL);
UCVarValue value;
if (singlebit)
{
if (var != NULL)
{
int bitdata;
int mask;
value = var->GetFavoriteRep (&type);
if (type != CVAR_Int)
{
return NULL;
}
bitdata = ReadByte (stream);
mask = 1 << (bitdata & 31);
if (bitdata & 32)
{
value.Int |= mask;
}
else
{
value.Int &= ~mask;
}
}
}
else
{
switch (type)
{
case CVAR_Bool: value.Bool = ReadByte (stream) ? 1 : 0; break;
case CVAR_Int: value.Int = ReadLong (stream); break;
case CVAR_Float: value.Float = ReadFloat (stream); break;
case CVAR_String: value.String = ReadString (stream); break;
default: break; // Silence GCC
}
}
if (var)
{
var->ForceSet (value, type);
}
if (type == CVAR_String)
{
delete[] value.String;
}
if (var == &teamplay)
{
// Put players on teams if teamplay turned on
for (int i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i])
{
UpdateTeam (i, players[i].userinfo.team, true);
}
}
}
if (var)
{
value = var->GetGenericRep (CVAR_String);
return value.String;
}
return NULL;
}
EXTERN_CVAR (Float, sv_gravity)
void D_SendServerInfoChange (const FBaseCVar *cvar, UCVarValue value, ECVarType type)
{
size_t namelen;
namelen = strlen (cvar->GetName ());
Net_WriteByte (DEM_SINFCHANGED);
Net_WriteByte ((BYTE)(namelen | (type << 6)));
Net_WriteBytes ((BYTE *)cvar->GetName (), (int)namelen);
switch (type)
{
case CVAR_Bool: Net_WriteByte (value.Bool); break;
case CVAR_Int: Net_WriteLong (value.Int); break;
case CVAR_Float: Net_WriteFloat (value.Float); break;
case CVAR_String: Net_WriteString (value.String); break;
default: break; // Silence GCC
}
}
void D_SendServerFlagChange (const FBaseCVar *cvar, int bitnum, bool set)
{
int namelen;
namelen = (int)strlen (cvar->GetName ());
Net_WriteByte (DEM_SINFCHANGEDXOR);
Net_WriteByte ((BYTE)namelen);
Net_WriteBytes ((BYTE *)cvar->GetName (), namelen);
Net_WriteByte (BYTE(bitnum | (set << 5)));
}
void D_DoServerInfoChange (BYTE **stream, bool singlebit)
{
const char *value;
char name[64];
int len;
int type;
len = ReadByte (stream);
type = len >> 6;
len &= 0x3f;
if (len == 0)
return;
memcpy (name, *stream, len);
*stream += len;
name[len] = 0;
if ( (value = SetServerVar (name, (ECVarType)type, stream, singlebit)) && netgame)
{
Printf ("%s changed to %s\n", name, value);
}
}
void D_WriteUserInfoStrings (int i, BYTE **stream, bool compact)
{
if (i >= MAXPLAYERS)
{
WriteByte (0, stream);
}
else
{
userinfo_t *info = &players[i].userinfo;
const PClass *type = PlayerClasses[info->PlayerClass].Type;
if (!compact)
{
sprintf (*((char **)stream),
"\\name\\%s"
"\\autoaim\\%g"
"\\color\\%x %x %x"
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
"\\colorset\\%d"
"\\skin\\%s"
"\\team\\%d"
"\\gender\\%s"
"\\neverswitchonpickup\\%d"
"\\movebob\\%g"
"\\stillbob\\%g"
"\\playerclass\\%s"
,
D_EscapeUserInfo(info->netname).GetChars(),
(double)info->aimdist / (float)ANGLE_1,
RPART(info->color), GPART(info->color), BPART(info->color),
info->colorset,
D_EscapeUserInfo(skins[info->skin].name).GetChars(),
info->team,
info->gender == GENDER_FEMALE ? "female" :
info->gender == GENDER_NEUTER ? "other" : "male",
info->neverswitch,
(float)(info->MoveBob) / 65536.f,
(float)(info->StillBob) / 65536.f,
info->PlayerClass == -1 ? "Random" :
D_EscapeUserInfo(type->Meta.GetMetaString (APMETA_DisplayName)).GetChars()
);
}
else
{
sprintf (*((char **)stream),
"\\"
"\\%s" // name
"\\%g" // autoaim
"\\%x %x %x" // color
"\\%s" // skin
"\\%d" // team
"\\%s" // gender
"\\%d" // neverswitchonpickup
"\\%g" // movebob
"\\%g" // stillbob
"\\%s" // playerclass
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
"\\%d" // colorset
,
D_EscapeUserInfo(info->netname).GetChars(),
(double)info->aimdist / (float)ANGLE_1,
RPART(info->color), GPART(info->color), BPART(info->color),
D_EscapeUserInfo(skins[info->skin].name).GetChars(),
info->team,
info->gender == GENDER_FEMALE ? "female" :
info->gender == GENDER_NEUTER ? "other" : "male",
info->neverswitch,
(float)(info->MoveBob) / 65536.f,
(float)(info->StillBob) / 65536.f,
info->PlayerClass == -1 ? "Random" :
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
D_EscapeUserInfo(type->Meta.GetMetaString (APMETA_DisplayName)).GetChars(),
info->colorset
);
}
}
*stream += strlen (*((char **)stream)) + 1;
}
void D_ReadUserInfoStrings (int i, BYTE **stream, bool update)
{
userinfo_t *info = &players[i].userinfo;
const char *ptr = *((const char **)stream);
const char *breakpt;
FString value;
bool compact;
int infotype = -1;
if (*ptr++ != '\\')
return;
compact = (*ptr == '\\') ? ptr++, true : false;
if (i < MAXPLAYERS)
{
for (;;)
{
int j;
breakpt = strchr (ptr, '\\');
if (compact)
{
value = D_UnescapeUserInfo(ptr, breakpt != NULL ? breakpt - ptr : strlen(ptr));
infotype++;
}
else
{
assert(breakpt != NULL);
// A malicious remote machine could invalidate the above assert.
if (breakpt == NULL)
{
break;
}
const char *valstart = breakpt + 1;
if ( (breakpt = strchr (valstart, '\\')) != NULL )
{
value = D_UnescapeUserInfo(valstart, breakpt - valstart);
}
else
{
value = D_UnescapeUserInfo(valstart, strlen(valstart));
}
for (j = 0;
UserInfoStrings[j] && strnicmp (UserInfoStrings[j], ptr, valstart - ptr - 1) != 0;
++j)
{ }
if (UserInfoStrings[j] == NULL)
{
infotype = -1;
}
else
{
infotype = j;
}
}
switch (infotype)
{
case INFO_Autoaim: {
double angles;
angles = atof (value);
if (angles > 35.f || angles < 0.f)
{
info->aimdist = ANGLE_1*35;
}
else
{
info->aimdist = abs ((int)(angles * (float)ANGLE_1));
}
}
break;
case INFO_Name:
{
char oldname[MAXPLAYERNAME+1];
Update to ZDoom r1433: - Fixed: Untranslated colors in fonts had an alpha value of 0 but need 255. - Fixed: The Doom status bar's ammo display may not use the INDEXFONT for the alternative HUD. Instead it has to create a separate one out of the STYSNUM characters. - Fixed: skins can not be sorted for binary search because the player class code depends on the original indices. - Fixed: P_StartConversation set the global dialog node variable for all players, not just the consoleplayer. - Fixed: AWeapon::PickupForAmmo assumed that any weapon having a secondary ammo type also has a primary one. - Bumped netgame, demo and min demo version for the weapon slot changes. - changed weapon slots to be stored per player. Information is now transmitted across the network so that all machines know each player's current weapon configuration so that it can be used by cheats or HUD display routines. - fixed: level_info_t::mapbg was not initialized - Fixed: Player names and chat macros that end with incomplete \c escapes now have those escapes stripped before printing so that they do not merge with subsequent text. - Fixed: The CHARFORMAT structure that is used to set the color in a Windows Rich Edit control was not fully initialized resulting in incorrect colors being set. - Moved default weapon slot assignments into the player classes. Weapon.SlotNumber is now used solely for mods that want to add new weapons without completely redoing the player's arsenal. Restored some config-based weapon slot customization, though slots are no longer automatically saved to the config and section names have changed slightly. However, unlike before, config slots are now the definitive word on slot assignments and cannot be overridden by any other files loaded. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@302 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-21 17:07:32 +00:00
strcpy (oldname, info->netname);
strncpy (info->netname, value, MAXPLAYERNAME);
info->netname[MAXPLAYERNAME] = 0;
Update to ZDoom r1433: - Fixed: Untranslated colors in fonts had an alpha value of 0 but need 255. - Fixed: The Doom status bar's ammo display may not use the INDEXFONT for the alternative HUD. Instead it has to create a separate one out of the STYSNUM characters. - Fixed: skins can not be sorted for binary search because the player class code depends on the original indices. - Fixed: P_StartConversation set the global dialog node variable for all players, not just the consoleplayer. - Fixed: AWeapon::PickupForAmmo assumed that any weapon having a secondary ammo type also has a primary one. - Bumped netgame, demo and min demo version for the weapon slot changes. - changed weapon slots to be stored per player. Information is now transmitted across the network so that all machines know each player's current weapon configuration so that it can be used by cheats or HUD display routines. - fixed: level_info_t::mapbg was not initialized - Fixed: Player names and chat macros that end with incomplete \c escapes now have those escapes stripped before printing so that they do not merge with subsequent text. - Fixed: The CHARFORMAT structure that is used to set the color in a Windows Rich Edit control was not fully initialized resulting in incorrect colors being set. - Moved default weapon slot assignments into the player classes. Weapon.SlotNumber is now used solely for mods that want to add new weapons without completely redoing the player's arsenal. Restored some config-based weapon slot customization, though slots are no longer automatically saved to the config and section names have changed slightly. However, unlike before, config slots are now the definitive word on slot assignments and cannot be overridden by any other files loaded. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@302 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-21 17:07:32 +00:00
CleanseString(info->netname);
if (update && strcmp (oldname, info->netname) != 0)
{
Printf ("%s is now known as %s\n", oldname, info->netname);
}
}
break;
case INFO_Team:
UpdateTeam (i, atoi(value), update);
break;
case INFO_Color:
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
case INFO_ColorSet:
if (infotype == INFO_Color)
{
info->color = V_GetColorFromString (NULL, value);
info->colorset = -1;
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
}
else
{
info->colorset = atoi(value);
}
R_BuildPlayerTranslation (i);
if (StatusBar != NULL && i == StatusBar->GetPlayer())
{
StatusBar->AttachToPlayer (&players[i]);
}
break;
case INFO_Skin:
info->skin = R_FindSkin (value, players[i].CurrentPlayerClass);
if (players[i].mo != NULL)
{
if (players[i].cls != NULL &&
!(players[i].mo->flags4 & MF4_NOSKIN) &&
Update to ZDoom r1146 (warning: massive changes ahead!) - Removed DECORATE's ParseClass because it was only used to add data to fully internal actor classes which no longer exist. - Changed the state structure so that the Tics value doesn't need to be hacked into misc1 with SF_BIGTIC anymore. - Changed sprite processing so that sprite names are converted to indices during parsing so that an additional postprocessing step is no longer needed. - Fixed: Sprite names in DECORATE were case sensitive. - Exported AActor's defaults to DECORATE and removed all code for the internal property parser which is no longer needed. - Converted the Heresiarch to DECORATE. - Added an Active and Inactive state for monsters. - Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted GetRaiseSpeed and GetSinkSpeed. - Added some remaining DECORATE conversions for Hexen by Karate Chris. - Changed Windows to use the performance counter instead of rdtsc. - Changed Linux to use clock_gettime for profiling instead of rdtsc. This avoids potential erroneous results on multicore and variable speed processors. - Converted the last of Hexen's inventory items to DECORATE so that I could export AInventory. - Removed AT_GAME_SET because it's no longer used anywhere. - Converted the last remaining global classes to DECORATE. - Fixed: Inventory.PickupFlash requires an class name as parameter not an integer. Some Hexen definitions got it wrong. - Converted Hexen's Pig to DECORATE. - Replaced the ActorInfo definitions of all internal inventory classes with DECORATE definitions. - Added option to specify a powerup's duration in second by using a negative number. - Added Gez's Freedoom detection patch. - SBARINFO update: * Added: The ability to have drawkeybar auto detect spacing. * Added: Offset parameter to drawkeybar to allow two key bars with different keys. * Added: Multi-row/column keybar parameters. Spacing can also be auto. These defualt to left to right/top to bottom but can be switched. * Added: Drawshadow flag to drawnumber. This will draw a solid color and translucent number under the normal number. * Added: hexenarmor to drawimage. This takes a parameter for a hexen armor type and will fade the image like the hexen status bar. * Added: centerbottom offset to draw(switchable)image. * Added: translucent flag to drawinventorybar. * Fixed: Accidentally removed flag from DrawTexture that allowed negative coordinates to work with fullscreenoffsets. Hopefully this is the last major bug in the fullscreenoffsets system. - Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of registers AMD64 provides, this routine still needs to be written as self- modifying code for maximum performance. The additional registers do allow for further optimization over the x86 version by allowing all four pixels to be in flight at the same time. The end result is that AMD64 ASM is about 2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM. (For further comparison, AMD64 C and x86 C are practically the same for this function.) Should I port any more assembly to AMD64, mvlineasm4 is the most likely candidate, but it's not used enough at this point to bother. Also, this may or may not work with Linux at the moment, since it doesn't have the eh_handler metadata. Win64 is easier, since I just need to structure the function prologue and epilogue properly and use some assembler directives/macros to automatically generate the metadata. And that brings up another point: You need YASM to assemble the AMD64 code, because NASM doesn't support the Win64 metadata directives. - Replaced the ActorInfo definitions of several internal classes with DECORATE definitions - Converted teleport fog and destinations to DECORATE. - AActor::PreExplode is gone now that the last item that was using it has been converted. - Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE. - Exported Point pushers, CustomSprite and AmbientSound to DECORATE. - Changed increased lightning damage for Centaurs into a damage factor. - Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage types instead to keep dependencies on specific actor types out of the main engine code. - Added Korax DECORATE conversion by Gez and a few others by Karate Chris. - Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon pieces. - Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris. - Added aWeaponGiver class to generalize the standing AssaultGun. - converted a_Strifeweapons.cpp to DECORATE, except for the Sigil. - Added an SSE version of DoBlending. This is strictly C intrinsics. VC++ still throws around unneccessary register moves. GCC seems to be pretty close to optimal, requiring only about 2 cycles/color. They're both faster than my hand-written MMX routine, so I don't need to feel bad about not hand-optimizing this for x64 builds. - Removed an extra instruction from DoBlending_MMX, transposed two instructions, and unrolled it once, shaving off about 80 cycles from the time required to blend 256 palette entries. Why? Because I tried writing a C version of the routine using compiler intrinsics and was appalled by all the extra movq's VC++ added to the code. GCC was better, but still generated extra instructions. I only wanted a C version because I can't use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit of a pain. (It's a pain because Linux and Windows have different calling conventions, and you need to maintain extra metadata for functions.) So, the assembly version stays and the C version stays out. - Converted the rest of a_strifestuff.cpp to DECORATE. - Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange. I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that this feature can also be used by other actors. - Converted Strife's Stalker to DECORATE. - Converted ArtiTeleport to DECORATE. - Removed the NoBlockingSet method from AActor because everything using it has been converted to DECORATE using DropItem instead. - Changed: Macil doesn't need the StrifeHumanoid's special death states so he might as well inherit directly from AActor. - Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved the burning hand states to StrifePlayer where they really belong. - Added Gez's dropammofactor submission with some necessary changes. Also merged redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup. - Restricted native action function definitions to zdoom.pk3. - Fixed. The Firedemon was missing a game filter. - Added: disablegrin, disableouch, disablepain, and disablerampage flags to drawmugshot. - Fixed: LowerHealthCap did not work properly. - Fixed: Various bugs I noticed in the fullscreenoffsets code. - Removed all the pixel doubling r_detail modes, since the one platform they were intended to assist (486) actually sees very little benefit from them. - Rewrote CheckMMX in C and renamed it to CheckCPU. - Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache only for AMD processors, so we must not use it on other architectures, or we end up overwriting the L1 cache line size with 0 or some other number we don't actually understand. - The x87 precision control is now explicitly set for double precision, since GCC defaults to extended precision instead, unlike Visual C++. - Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE. - Fixed: Attacking a merchant in Strife didn't alert the enemies. - Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two occurences in the code that depended on it were changed accordingly. Invulnerability colormaps are now being set by the items exclusively. - Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER so that it can hopefully be generalized to be usable elsewhere later. - Added Gez's submission for converting the Minotaur to DECORATE. - Fixed a few minor DECORATE bugs. - Changed coordinate storage for EntityBoss so that it works properly even when the pod is not used to spawn it. - Converted Strife's Spectres and Entity to DECORATE. - Added: fullscreenoffsets flag for status bars. This changes the coordinate system to be relative to the top left corner of the screen. This is useful for full screen status bars. - Changed: drawinventorybar will use the width of artibox or invcurs (strife) to determine the spacing. Let me know if this breaks any released mods. - Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar would be shown. - Fixed: If a static inventory bar was used the user still had to press invuse in order to get rid of the "overlay". - Fixed: forcescaled would not work if the height of the bar was 0. - Added: keyslot to drawswitchableimage. - Fixed: The transition effects for the log and keys popups were switched. - Converted Strife's Crusader, Inquisitor and spectral missiles to DECORATE. - Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to DECORATE. - Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris. - Added a check to Zipdir that excludes files with a .orig extension. These can be left behind by patch.exe and create problems. - fixed: Unmorphing from chicken caused a crash when reading non-existent meta-data strings. - Converted the ScriptedMarines to DECORATE. - Fixed: DLightTransfer and DWallLightTransfer were declared as actors. - Converted the PhoenixRod and associated classes to DECORATE to make the Heretic conversion complete. - Converted the Minotaur's projectiles to DECORATE so that I can get rid of the AT_SPEED_SET code. - Converted Heretic's Blaster and SkullRod to DECORATE. - Converted the mace and all related actors to DECORATE and generalized the spawn function that only spawns one mace per level. - Moved Mace respawning code into AInventory so that it works properly for replacement actors. - Added more DECORATE conversions by Karate Chris. - Cleaned up the new bridge code and exported all related actors to DECORATE so that the exported code pointers can be used. - Separated Heretic's and Hexen's invulnerability items for stability reasons. - Fixed spurious warnings on 32-bit VC++ debug builds. - Made the subsong (order) number a proper parameter to MusInfo::Play() instead of requiring a separate SetPosition() call to do it. - Added Gez's submission for custom bridge things. - Fixed: ASpecialSpot must check the array's size before dividing by it. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
players[i].mo->state->sprite ==
GetDefaultByType (players[i].cls)->SpawnState->sprite)
{ // Only change the sprite if the player is using a standard one
players[i].mo->sprite = skins[info->skin].sprite;
}
}
// Rebuild translation in case the new skin uses a different range
// than the old one.
R_BuildPlayerTranslation (i);
break;
case INFO_Gender:
info->gender = D_GenderToInt (value);
break;
case INFO_NeverSwitchOnPickup:
if (value[0] >= '0' && value[0] <= '9')
{
info->neverswitch = atoi (value) ? true : false;
}
else if (stricmp (value, "true") == 0)
{
info->neverswitch = 1;
}
else
{
info->neverswitch = 0;
}
break;
case INFO_MoveBob:
info->MoveBob = (fixed_t)(atof (value) * 65536.f);
break;
case INFO_StillBob:
info->StillBob = (fixed_t)(atof (value) * 65536.f);
break;
case INFO_PlayerClass:
info->PlayerClass = D_PlayerClassToInt (value);
break;
default:
break;
}
if (breakpt)
{
ptr = breakpt + 1;
}
else
{
break;
}
}
}
*stream += strlen (*((char **)stream)) + 1;
}
FArchive &operator<< (FArchive &arc, userinfo_t &info)
{
if (arc.IsStoring ())
{
arc.Write (&info.netname, sizeof(info.netname));
}
else
{
arc.Read (&info.netname, sizeof(info.netname));
}
* Updated to ZDoom r3038 (IWAD selection dialog already fixed in previous commit): - Added DavidPH's submission for specifying vertex heights directly in UDMF. - Move static AM color initialization into the AM_StaticInit function. - Move D_LoadWadSettings to keysections.cpp. - Made some more data reloadable. - Data structures filled by P_SetupLevel should be cleared before loading the level. They can remain non-empty in case of an error. There's probably more to fix here... - Fixed: MidiDevices and MusicAliases were not cleared before reloading local SNDINFOs. - Fixed signed/unsigned warnings in AddSwitchPair for real (GCC really allows -1u? MSVC prints a warning for that.) - Fixed: GCC compiler warnings. - Zipdir will no longer store files ending in '~' on Linux. - Added st_oldouch which restores the old ouch face behavior of only showing when health increases by 20 while taking damage. - Changed some data init code to delete the data it wants to initialize first. - The 'savebuffer' variable still existed? - Changed AInventory::Destroy to NULL SendItemUse and SendItemDrop if they point to the destroyed object. Although unlikely it can't be ruled out completely that this can happen with delayed CCMDs. - Fixed: Starting a new game did not clear the hub statistics array. - Cleaned up D_DoomMain a little. It's still far too large though. - Added explicit initialization of console background texture instead of letting C_InitConsole doing it as needed. - Added 'clearaliases' CCMD. - Init bot specific actor properties right after parsing DECORATE, not when spawning the first bot (which is too late.) - Changed automap initialization so that static data only gets initialized once upon startup instead of each time a level starts. - Initialize AUTOPAGE only once when the level starts, not each time the automap is switched on. - Cleaned up switch code and fixed several problems: * savegames stored an index in the switch table and performed no validation when loading a savegame. * setting of a random switch animation duration was broken. * separated the 2 values stored in the Time variable into 2 separate variables. * defining a switch with one texture already belonging to another switch could leave broken definitions in the switch table. - Added function for serializing switch and door animation pointers. - Bumped min. savegame versions due to changes to DButtonThinker and removed all current savegame compatibility code. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1128 b0f79afe-0144-0410-b225-9a4edf0717df
2010-12-14 22:53:44 +00:00
arc << info.team << info.aimdist << info.color
<< info.skin << info.gender << info.neverswitch
<< info.colorset;
return arc;
}
CCMD (playerinfo)
{
if (argv.argc() < 2)
{
int i;
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i])
{
Printf ("%d. %s\n", i, players[i].userinfo.netname);
}
}
}
else
{
int i = atoi (argv[1]);
userinfo_t *ui = &players[i].userinfo;
Printf ("Name: %s\n", ui->netname);
- Update to ZDoom r1401: - Made improvements so that the FOptionalMapinfoData class is easier to use. - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This lets A_Look() always put the actor into its see state. This problem could be heard by an Archvile's resurrectee playing its see sound but failing to enter its see state because it was called from A_Chase(). - Fixed: SBARINFO used different rounding modes for the background and foreground of the DrawBar command. - Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Added a fflush() call after the logfile write in I_FatalError so that the error text is visible in the file while the error dialog is displayed. - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. - rewrote the MAPINFO parser: * split level_info_t::flags into 2 DWORDS so that I don't have to deal with 64 bit values later. * split off skill code into its own file * created a parser class for MAPINFO * replaced all uses of ReplaceString in level_info_t with FStrings and made the specialaction data a TArray so that levelinfos can be handled without error prone maintenance functions. * split of parser code from g_level.cpp * const-ified parameters to F_StartFinale. * Changed how G_MaybeLookupLevelName works and made it return an FString. * removed 64 character limit on level names. - Changed DECORATE replacements so that they aren't overridden by Dehacked. - Fixed: The damage factor for 'normal' damage is supposed to be applied to all damage types that don't have a specific damage factor. - Changed FMOD init() to allocate some virtual channels. - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test. - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate for lclip and rclip. - Added weapdrop ccmd. - Centered the compatibility mode option in the comptibility options menu. - Added button mappings for 8 mouse buttons on SDL. It works with my system, but Linux being Linux, there are no guarantees that it's appropriate for other systems. - Fixed: SDL input code did not generate GUI events for the mousewheel, so it could not be used to scroll the console buffer. - Added Blzut3's statusbar maintenance patch. - fixed sound origin of the Mage Wand's missile. - Added APROP_Dropped actor property. - Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start. - Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF - More GCC warning removal, the most egregious of which was the security vulnerability "format not a string literal and no format arguments". - Changed the CMake script to search for fmod libraries by full name instead of assuming a symbolic link has been placed for the latest version. It can also find a non-installed copy of FMOD if it is placed local to the ZDoom source tree. - Fixed: Some OPL state needs to be restored before calculating rhythm. Also, since only the rhythm section uses the RNG, it doesn't need to be advanced for the normal voice processing. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@297 b0f79afe-0144-0410-b225-9a4edf0717df
2009-02-05 00:06:30 +00:00
Printf ("Team: %s (%d)\n", ui->team == TEAM_NONE ? "None" : Teams[ui->team].GetName (), ui->team);
Printf ("Aimdist: %d\n", ui->aimdist);
Printf ("Color: %06x\n", ui->color);
Update to ZDoom r2198: - let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling. - fixed: The ChexPlayer was missing default colorset definitions. - Final Doom needs its finale flats changed, too. - It's "BGCASTCALL", not "BOSSBACK". - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. - Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map. - Added support for the original games' player translations, including Hexen's table-based ones. - Fixed: CheckActorClass needed a NULL check. - Fixed: FFont::StringWidth() counted the ']' character of a named color escape sequence in its width calculation. - Fixed: FSinglePicFont should set the character size by the scaled size of the texture. - Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an atexit for it, which gets executed after the sound system shuts down. - Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is unsigned now. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@744 b0f79afe-0144-0410-b225-9a4edf0717df
2010-03-06 11:03:55 +00:00
Printf ("ColorSet: %d\n", ui->colorset);
Printf ("Skin: %s (%d)\n", skins[ui->skin].name, ui->skin);
Printf ("Gender: %s (%d)\n", GenderNames[ui->gender], ui->gender);
Printf ("NeverSwitch: %d\n", ui->neverswitch);
Printf ("MoveBob: %g\n", ui->MoveBob/65536.f);
Printf ("StillBob: %g\n", ui->StillBob/65536.f);
Printf ("PlayerClass: %s (%d)\n",
ui->PlayerClass == -1 ? "Random" : PlayerClasses[ui->PlayerClass].Type->Meta.GetMetaString (APMETA_DisplayName),
ui->PlayerClass);
if (argv.argc() > 2) PrintMiscActorInfo(players[i].mo);
}
}