mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
add dmamount event
This commit is contained in:
parent
e00694b141
commit
d1b5d78bf0
10 changed files with 65 additions and 6 deletions
|
@ -209,6 +209,15 @@ Event EV_Item_SetAmount
|
||||||
"Sets the amount of the item.",
|
"Sets the amount of the item.",
|
||||||
EV_NORMAL
|
EV_NORMAL
|
||||||
);
|
);
|
||||||
|
Event EV_Item_SetDMAmount
|
||||||
|
(
|
||||||
|
"dmamount",
|
||||||
|
EV_DEFAULT,
|
||||||
|
"i",
|
||||||
|
"amount",
|
||||||
|
"Sets the amount of the item.",
|
||||||
|
EV_NORMAL
|
||||||
|
);
|
||||||
Event EV_Item_SetMaxAmount
|
Event EV_Item_SetMaxAmount
|
||||||
(
|
(
|
||||||
"maxamount",
|
"maxamount",
|
||||||
|
@ -332,6 +341,7 @@ CLASS_DECLARATION( Trigger, Item, NULL )
|
||||||
{ &EV_Item_DropToFloor, &Item::DropToFloor },
|
{ &EV_Item_DropToFloor, &Item::DropToFloor },
|
||||||
{ &EV_Item_Respawn, &Item::Respawn },
|
{ &EV_Item_Respawn, &Item::Respawn },
|
||||||
{ &EV_Item_SetAmount, &Item::SetAmountEvent },
|
{ &EV_Item_SetAmount, &Item::SetAmountEvent },
|
||||||
|
{ &EV_Item_SetDMAmount, &Item::SetDMAmountEvent },
|
||||||
{ &EV_Item_SetMaxAmount, &Item::SetMaxAmount },
|
{ &EV_Item_SetMaxAmount, &Item::SetMaxAmount },
|
||||||
{ &EV_Item_SetItemName, &Item::SetItemName },
|
{ &EV_Item_SetItemName, &Item::SetItemName },
|
||||||
{ &EV_Item_Pickup, &Item::Pickup },
|
{ &EV_Item_Pickup, &Item::Pickup },
|
||||||
|
@ -923,13 +933,24 @@ void Item::SetMax
|
||||||
}
|
}
|
||||||
|
|
||||||
void Item::SetAmountEvent
|
void Item::SetAmountEvent
|
||||||
(
|
(
|
||||||
Event *ev
|
Event *ev
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
setAmount( ev->GetInteger( 1 ) );
|
setAmount( ev->GetInteger( 1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Item::SetDMAmountEvent
|
||||||
|
(
|
||||||
|
Event *ev
|
||||||
|
)
|
||||||
|
|
||||||
|
{
|
||||||
|
if (!g_gametype->integer)
|
||||||
|
return;
|
||||||
|
setAmount(ev->GetInteger(1));
|
||||||
|
}
|
||||||
|
|
||||||
void Item::SetMaxAmount
|
void Item::SetMaxAmount
|
||||||
(
|
(
|
||||||
|
|
|
@ -98,6 +98,7 @@ public:
|
||||||
virtual str getName( void );
|
virtual str getName( void );
|
||||||
virtual int getIndex( void );
|
virtual int getIndex( void );
|
||||||
virtual void SetAmountEvent( Event *ev );
|
virtual void SetAmountEvent( Event *ev );
|
||||||
|
virtual void SetDMAmountEvent(Event *ev);
|
||||||
virtual void SetMaxAmount( Event *ev );
|
virtual void SetMaxAmount( Event *ev );
|
||||||
virtual void SetItemName( Event *ev );
|
virtual void SetItemName( Event *ev );
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
WorldPtr world;
|
WorldPtr world;
|
||||||
|
|
||||||
|
Event EV_World_MapTime
|
||||||
|
(
|
||||||
|
"map_time",
|
||||||
|
EV_DEFAULT,
|
||||||
|
"i",
|
||||||
|
"version",
|
||||||
|
"Internal usage."
|
||||||
|
);
|
||||||
Event EV_World_SetSoundtrack
|
Event EV_World_SetSoundtrack
|
||||||
(
|
(
|
||||||
"soundtrack",
|
"soundtrack",
|
||||||
|
@ -207,6 +215,23 @@ Event EV_World_SetNorthYaw
|
||||||
"yaw",
|
"yaw",
|
||||||
"Sets the yaw direction that is considered to be north"
|
"Sets the yaw direction that is considered to be north"
|
||||||
);
|
);
|
||||||
|
Event EV_World_SetSunDiffuse
|
||||||
|
(
|
||||||
|
"sundiffuse",
|
||||||
|
EV_DEFAULT,
|
||||||
|
"f",
|
||||||
|
"factor",
|
||||||
|
"Sets the fraction of the sunlight to use for diffuse sun"
|
||||||
|
);
|
||||||
|
|
||||||
|
Event EV_World_SetSunDiffuseColor
|
||||||
|
(
|
||||||
|
"sundiffusecolor",
|
||||||
|
EV_DEFAULT,
|
||||||
|
"v",
|
||||||
|
"diffusecolor",
|
||||||
|
"Sets an alternate sun color to use for clcing diffuse sun"
|
||||||
|
);
|
||||||
|
|
||||||
void World::AddTargetEntity( SimpleEntity *ent )
|
void World::AddTargetEntity( SimpleEntity *ent )
|
||||||
{
|
{
|
||||||
|
@ -562,6 +587,8 @@ CLASS_DECLARATION( Entity, World, "worldspawn" )
|
||||||
{ &EV_World_LightmapDensity, NULL },
|
{ &EV_World_LightmapDensity, NULL },
|
||||||
{ &EV_World_SunFlare, NULL },
|
{ &EV_World_SunFlare, NULL },
|
||||||
{ &EV_World_SunFlareInPortalSky, NULL },
|
{ &EV_World_SunFlareInPortalSky, NULL },
|
||||||
|
{ &EV_World_SetSunDiffuse, NULL },
|
||||||
|
{ &EV_World_SetSunDiffuseColor, NULL },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -61,12 +61,13 @@
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{C43E74A6-EA43-4264-B8E5-F6E4CC9843DC}</ProjectGuid>
|
<ProjectGuid>{C43E74A6-EA43-4264-B8E5-F6E4CC9843DC}</ProjectGuid>
|
||||||
<RootNamespace>FLEX_Bison</RootNamespace>
|
<RootNamespace>FLEX_Bison</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
<ProjectGuid>{D198C7F1-A045-455F-98F1-610AF58541A7}</ProjectGuid>
|
<ProjectGuid>{D198C7F1-A045-455F-98F1-610AF58541A7}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>cgame</RootNamespace>
|
<RootNamespace>cgame</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<ProjectGuid>{592A55D2-199C-4550-8BB3-771BCA89C244}</ProjectGuid>
|
<ProjectGuid>{592A55D2-199C-4550-8BB3-771BCA89C244}</ProjectGuid>
|
||||||
<RootNamespace>cgame</RootNamespace>
|
<RootNamespace>cgame</RootNamespace>
|
||||||
<ProjectName>cgame_hook</ProjectName>
|
<ProjectName>cgame_hook</ProjectName>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>game</RootNamespace>
|
<RootNamespace>game</RootNamespace>
|
||||||
<ProjectName />
|
<ProjectName />
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
@ -101,6 +102,7 @@
|
||||||
<MinimalRebuild>false</MinimalRebuild>
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
<AdditionalIncludeDirectories>../../../code/globalcpp;../../../code/game;../../../code/qcommon;../../../code/tiki;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../../../code/globalcpp;../../../code/game;../../../code/qcommon;../../../code/tiki;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||||
|
<AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
@ -139,6 +141,7 @@
|
||||||
<PreprocessorDefinitions>WIN32;GAME_DLL;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_WINDOWS;_USRDLL;GAME_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;GAME_DLL;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_WINDOWS;_USRDLL;GAME_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>../../../code/globalcpp;../../../code/game;../../../code/qcommon;../../../code/tiki;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../../../code/globalcpp;../../../code/game;../../../code/qcommon;../../../code/tiki;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
<ProjectGuid>{51E338B6-FF7D-45C6-893D-A6DA1CDC3C6E}</ProjectGuid>
|
<ProjectGuid>{51E338B6-FF7D-45C6-893D-A6DA1CDC3C6E}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>omohaaded</RootNamespace>
|
<RootNamespace>omohaaded</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
@ -98,6 +99,7 @@
|
||||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;_DEBUG;CONSOLE;BOTLIB;DEDICATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NO_SCRIPTENGINE;_DEBUG;CONSOLE;BOTLIB;DEDICATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>../../../code/SDL12/include;../../../code/libmad/include;../../../code/globalcpp;../../../code/qcommon;../../../code/server;../../../code/tiki</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>../../../code/SDL12/include;../../../code/libmad/include;../../../code/globalcpp;../../../code/qcommon;../../../code/server;../../../code/tiki</AdditionalIncludeDirectories>
|
||||||
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
|
||||||
|
<AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
<ProjectGuid>{A9E3E13B-C83E-48AC-91EA-4942B0FF723A}</ProjectGuid>
|
<ProjectGuid>{A9E3E13B-C83E-48AC-91EA-4942B0FF723A}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>openmohaa</RootNamespace>
|
<RootNamespace>openmohaa</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
@ -141,7 +142,7 @@
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalLibraryDirectories>..\..\..\code\libs\win32</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\..\code\libs\win32</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;opengl32.lib;winmm.lib;wsock32.lib;sdl2.lib;sdl2main.lib;libmad.lib;OpenAL32.lib;glew32s.lib;dxguid.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;opengl32.lib;winmm.lib;wsock32.lib;sdl2.lib;sdl2main.lib;libmad.lib;OpenAL32.lib;glew32s.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<IgnoreSpecificDefaultLibraries>libcmt;</IgnoreSpecificDefaultLibraries>
|
<IgnoreSpecificDefaultLibraries>libcmt;</IgnoreSpecificDefaultLibraries>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
|
@ -111,6 +111,7 @@
|
||||||
<ProjectGuid>{B195EFFE-6A33-4315-94B5-A9A0906194D9}</ProjectGuid>
|
<ProjectGuid>{B195EFFE-6A33-4315-94B5-A9A0906194D9}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>testutils</RootNamespace>
|
<RootNamespace>testutils</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue