Initial commit
This commit is contained in:
commit
38bbebb1cc
56 changed files with 1052 additions and 0 deletions
BIN
ext/props.dll
Normal file
BIN
ext/props.dll
Normal file
Binary file not shown.
BIN
ext/props.exp
Normal file
BIN
ext/props.exp
Normal file
Binary file not shown.
BIN
ext/props.lib
Normal file
BIN
ext/props.lib
Normal file
Binary file not shown.
BIN
ext/props.pdb
Normal file
BIN
ext/props.pdb
Normal file
Binary file not shown.
122
ext/props.txt
Normal file
122
ext/props.txt
Normal file
|
|
@ -0,0 +1,122 @@
|
||||||
|
"Props"
|
||||||
|
{
|
||||||
|
"props_c17"
|
||||||
|
{
|
||||||
|
"1" "props_c17/Frame002a.mdl"
|
||||||
|
"2" "props_c17/FurnitureArmchair001a.mdl"
|
||||||
|
"3" "props_c17/FurnitureChair001a.mdl"
|
||||||
|
"4" "props_c17/FurnitureCupboard001a.mdl"
|
||||||
|
"5" "props_c17/FurnitureDrawer001a.mdl"
|
||||||
|
"6" "props_c17/FurnitureDrawer002a.mdl"
|
||||||
|
"7" "props_c17/FurnitureDrawer003a.mdl"
|
||||||
|
"8" "props_c17/FurnitureDresser001a.mdl"
|
||||||
|
"9" "props_c17/FurnitureShelf001a.mdl"
|
||||||
|
"10" "props_c17/FurnitureShelf001b.mdl"
|
||||||
|
"11" "props_c17/FurnitureTable001a.mdl"
|
||||||
|
"12" "props_c17/FurnitureTable002a.mdl"
|
||||||
|
"13" "props_c17/FurnitureTable003a.mdl"
|
||||||
|
"14" "props_c17/bench01a.mdl"
|
||||||
|
"15" "props_c17/oildrum001_explosive.mdl"
|
||||||
|
"16" "props_c17/playground_swingset_seat01a.mdl"
|
||||||
|
"17" "props_c17/playground_teetertoter_seat.mdl"
|
||||||
|
"18" "props_c17/shelfunit01a.mdl"
|
||||||
|
}
|
||||||
|
"props_canal"
|
||||||
|
{
|
||||||
|
"1" "props_canal/boat001a.mdl"
|
||||||
|
"2" "props_canal/boat001b.mdl"
|
||||||
|
"3" "props_canal/boat002b.mdl"
|
||||||
|
}
|
||||||
|
"props_combine"
|
||||||
|
{
|
||||||
|
"1" "props_combine/breenbust.mdl"
|
||||||
|
"2" "props_combine/breenbust_Chunk01.mdl"
|
||||||
|
}
|
||||||
|
"props_debris"
|
||||||
|
{
|
||||||
|
"1" "props_debris/concrete_column001a_Core.mdl"
|
||||||
|
"2" "props_debris/concrete_spawnplug001a.mdl"
|
||||||
|
"3" "props_debris/tile_wall001a_Core.mdl"
|
||||||
|
"4" "props_debris/wood_board01a.mdl"
|
||||||
|
"5" "props_debris/wood_board02a.mdl"
|
||||||
|
"6" "props_debris/wood_board03a.mdl"
|
||||||
|
"7" "props_debris/wood_board04a.mdl"
|
||||||
|
"8" "props_debris/wood_board05a.mdl"
|
||||||
|
"9" "props_debris/wood_board06a.mdl"
|
||||||
|
"10" "props_debris/wood_board07a.mdl"
|
||||||
|
}
|
||||||
|
"props_docks"
|
||||||
|
{
|
||||||
|
"1" "props_docks/channelmarker01a.mdl"
|
||||||
|
"2" "props_docks/channelmarker01b.mdl"
|
||||||
|
"3" "props_docks/channelmarker01c.mdl"
|
||||||
|
"4" "props_docks/channelmarker02a.mdl"
|
||||||
|
"5" "props_docks/channelmarker02b_chunk01a.mdl"
|
||||||
|
"6" "props_docks/channelmarker02b_chunk01b.mdl"
|
||||||
|
"7" "props_docks/channelmarker02b_chunk01c.mdl"
|
||||||
|
"8" "props_docks/channelmarker02b_chunk01d.mdl"
|
||||||
|
"9" "props_docks/channelmarker_gib01.mdl"
|
||||||
|
"10" "props_docks/channelmarker_gib02.mdl"
|
||||||
|
"11" "props_docks/channelmarker_gib03.mdl"
|
||||||
|
"12" "props_docks/channelmarker_gib04.mdl"
|
||||||
|
}
|
||||||
|
"props_interiors"
|
||||||
|
{
|
||||||
|
"1" "props_interiors/Furniture_CabinetDrawer01a.mdl"
|
||||||
|
"2" "props_interiors/Furniture_Couch01a.mdl"
|
||||||
|
"3" "props_interiors/Furniture_Couch02a.mdl"
|
||||||
|
"4" "props_interiors/Furniture_Desk01a.mdl"
|
||||||
|
"5" "props_interiors/Furniture_Vanity01a.mdl"
|
||||||
|
"6" "props_interiors/Furniture_chair01a.mdl"
|
||||||
|
"7" "props_interiors/Furniture_shelf01a.mdl"
|
||||||
|
}
|
||||||
|
"props_junk"
|
||||||
|
{
|
||||||
|
"1" "props_junk/GlassBottle01a.mdl"
|
||||||
|
"2" "props_junk/cardboard_box001a.mdl"
|
||||||
|
"3" "props_junk/cardboard_box001b.mdl"
|
||||||
|
"4" "props_junk/cardboard_box002a.mdl"
|
||||||
|
"5" "props_junk/cardboard_box002b.mdl"
|
||||||
|
"6" "props_junk/cardboard_box003a.mdl"
|
||||||
|
"7" "props_junk/cardboard_box003b.mdl"
|
||||||
|
"8" "props_junk/cardboard_box004a.mdl"
|
||||||
|
"9" "props_junk/garbage_coffeemug001a.mdl"
|
||||||
|
"10" "props_junk/garbage_glassbottle001a.mdl"
|
||||||
|
"11" "props_junk/garbage_glassbottle002a.mdl"
|
||||||
|
"12" "props_junk/garbage_glassbottle003a.mdl"
|
||||||
|
"13" "props_junk/gascan001a.mdl"
|
||||||
|
"14" "props_junk/glassjug01.mdl"
|
||||||
|
"15" "props_junk/propane_tank001a.mdl"
|
||||||
|
"16" "props_junk/terracotta01.mdl"
|
||||||
|
"17" "props_junk/vent001.mdl"
|
||||||
|
"18" "props_junk/watermelon01.mdl"
|
||||||
|
"19" "props_junk/wood_crate001a.mdl"
|
||||||
|
"20" "props_junk/wood_crate001a_damaged.mdl"
|
||||||
|
"21" "props_junk/wood_crate001a_damagedmax.mdl"
|
||||||
|
"22" "props_junk/wood_crate002a.mdl"
|
||||||
|
"23" "props_junk/wood_pallet001a.mdl"
|
||||||
|
"24" "props_junk/watermelon01_chunk01a.mdl"
|
||||||
|
"25" "props_junk/watermelon01_chunk01b.mdl"
|
||||||
|
"26" "props_junk/watermelon01_chunk01c.mdl"
|
||||||
|
}
|
||||||
|
"props_lab"
|
||||||
|
{
|
||||||
|
"1" "props_lab/dogobject_wood_crate001a_damagedmax.mdl"
|
||||||
|
}
|
||||||
|
"props_wasteland"
|
||||||
|
{
|
||||||
|
"1" "props_wasteland/barricade001a.mdl"
|
||||||
|
"2" "props_wasteland/cafeteria_bench001a.mdl"
|
||||||
|
"3" "props_wasteland/cafeteria_table001a.mdl"
|
||||||
|
"4" "props_wasteland/dockplank01a.mdl"
|
||||||
|
"5" "props_wasteland/dockplank01b.mdl"
|
||||||
|
"6" "props_wasteland/prison_padlock001a.mdl"
|
||||||
|
"7" "props_wasteland/prison_shelf002a.mdl"
|
||||||
|
"8" "props_wasteland/prison_sink001b.mdl"
|
||||||
|
"9" "props_wasteland/prison_toilet01.mdl"
|
||||||
|
"10" "props_wasteland/wood_fence01a.mdl"
|
||||||
|
"11" "props_wasteland/wood_fence01b.mdl"
|
||||||
|
"12" "props_wasteland/wood_fence01c.mdl"
|
||||||
|
"13" "props_wasteland/wood_fence02a.mdl"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
ipch/props-32c7acc0/props-33ed56da.ipch
Normal file
BIN
ipch/props-32c7acc0/props-33ed56da.ipch
Normal file
Binary file not shown.
BIN
ipch/props-32c7acc0/props-9fb28160.ipch
Normal file
BIN
ipch/props-32c7acc0/props-9fb28160.ipch
Normal file
Binary file not shown.
BIN
jbmod.sdf
Normal file
BIN
jbmod.sdf
Normal file
Binary file not shown.
20
jbmod.sln
Normal file
20
jbmod.sln
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "props", "props\props.vcxproj", "{1C95495F-E6A5-4F65-B54F-9E8044AC0903}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{1C95495F-E6A5-4F65-B54F-9E8044AC0903}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{1C95495F-E6A5-4F65-B54F-9E8044AC0903}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{1C95495F-E6A5-4F65-B54F-9E8044AC0903}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{1C95495F-E6A5-4F65-B54F-9E8044AC0903}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
BIN
jbmod.suo
Normal file
BIN
jbmod.suo
Normal file
Binary file not shown.
BIN
props/Debug/CL.read.1.tlog
Normal file
BIN
props/Debug/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/CL.write.1.tlog
Normal file
BIN
props/Debug/CL.write.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/cl.command.1.tlog
Normal file
BIN
props/Debug/cl.command.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/extern.obj
Normal file
BIN
props/Debug/extern.obj
Normal file
Binary file not shown.
BIN
props/Debug/link.command.1.tlog
Normal file
BIN
props/Debug/link.command.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/link.read.1.tlog
Normal file
BIN
props/Debug/link.read.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/link.write.1.tlog
Normal file
BIN
props/Debug/link.write.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/mt.command.1.tlog
Normal file
BIN
props/Debug/mt.command.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/mt.read.1.tlog
Normal file
BIN
props/Debug/mt.read.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/mt.write.1.tlog
Normal file
BIN
props/Debug/mt.write.1.tlog
Normal file
Binary file not shown.
BIN
props/Debug/plugin.obj
Normal file
BIN
props/Debug/plugin.obj
Normal file
Binary file not shown.
23
props/Debug/props.Build.CppClean.log
Normal file
23
props/Debug/props.Build.CppClean.log
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
..\..\Steam\steamapps\common\Source SDK Base\bin\props.ilk
|
||||||
|
..\..\Steam\steamapps\common\Source SDK Base\bin\props.pdb
|
||||||
|
D:\jbmod\props\..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll
|
||||||
|
D:\jbmod\props\Debug\cl.command.1.tlog
|
||||||
|
D:\jbmod\props\Debug\CL.read.1.tlog
|
||||||
|
D:\jbmod\props\Debug\CL.write.1.tlog
|
||||||
|
D:\JBMOD\PROPS\DEBUG\EXTERN.OBJ
|
||||||
|
D:\jbmod\props\Debug\link.command.1.tlog
|
||||||
|
D:\jbmod\props\Debug\link.read.1.tlog
|
||||||
|
D:\jbmod\props\Debug\link.write.1.tlog
|
||||||
|
D:\jbmod\props\Debug\mt.command.1.tlog
|
||||||
|
D:\jbmod\props\Debug\mt.read.1.tlog
|
||||||
|
D:\jbmod\props\Debug\mt.write.1.tlog
|
||||||
|
D:\JBMOD\PROPS\DEBUG\PROPS.DLL.INTERMEDIATE.MANIFEST
|
||||||
|
D:\jbmod\props\Debug\props.write.1.tlog
|
||||||
|
D:\JBMOD\PROPS\DEBUG\SIGSCAN.OBJ
|
||||||
|
D:\jbmod\props\Debug\vc100.idb
|
||||||
|
D:\JBMOD\PROPS\DEBUG\VC100.PDB
|
||||||
|
D:\STEAM\STEAMAPPS\COMMON\SOURCE SDK BASE\BIN\PROPS.DLL
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\STEAM\STEAMAPPS\COMMON\SOURCE SDK BASE\BIN\PROPS.ILK
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\STEAM\STEAMAPPS\COMMON\SOURCE SDK BASE\BIN\PROPS.PDB
|
||||||
10
props/Debug/props.dll.intermediate.manifest
Normal file
10
props/Debug/props.dll.intermediate.manifest
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||||
|
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges>
|
||||||
|
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
</assembly>
|
||||||
2
props/Debug/props.lastbuildstate
Normal file
2
props/Debug/props.lastbuildstate
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#v4.0:v100:false
|
||||||
|
Debug|Win32|D:\jbmod\|
|
||||||
25
props/Debug/props.log
Normal file
25
props/Debug/props.log
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
Build started 05.03.2018 3:42:40.
|
||||||
|
1>Project "D:\jbmod\props\props.vcxproj" on node 2 (build target(s)).
|
||||||
|
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(299,5): warning MSB8004: каталог Output заканчивается не косой чертой. Этот экземпляр построения добавит косую черту, поскольку она необходима для правильного определения каталога Output.
|
||||||
|
1>InitializeBuildStatus:
|
||||||
|
Creating "Debug\props.unsuccessfulbuild" because "AlwaysCreate" was specified.
|
||||||
|
ClCompile:
|
||||||
|
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /ID:\source2006\game_shared /ID:\source2006\dlls /ID:\source2006\public\tier1 /ID:\source2006\public\tier0 /ID:\source2006\public /ID:\source2006\common /ID:\source2006\ /ZI /nologo /W3 /WX- /Od /Oy- /D _WINDLL /D _MBCS /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt plugin.cpp
|
||||||
|
plugin.cpp
|
||||||
|
Link:
|
||||||
|
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll" /NOLOGO /LIBPATH:D:\source2006\lib\public mathlib.lib vstdlib.lib tier0.lib tier1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NODEFAULTLIB:LIBCMT.lib /MANIFEST /ManifestFile:"Debug\props.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\Steam\steamapps\common\Source SDK Base\bin\props.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"..\..\Steam\steamapps\common\Source SDK Base\bin\props.lib" /MACHINE:X86 /DLL Debug\extern.obj
|
||||||
|
Debug\plugin.obj
|
||||||
|
Debug\sigscan.obj
|
||||||
|
LINK : не найден или не выполнена сборка ..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll при последней инкрементной компоновке; выполняется полная компоновка
|
||||||
|
Создается библиотека ..\..\Steam\steamapps\common\Source SDK Base\bin\props.lib и объект ..\..\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
props.vcxproj -> D:\jbmod\props\..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll
|
||||||
|
Manifest:
|
||||||
|
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:"..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll;#2" /manifest Debug\props.dll.intermediate.manifest
|
||||||
|
FinalizeBuildStatus:
|
||||||
|
Deleting file "Debug\props.unsuccessfulbuild".
|
||||||
|
Touching "Debug\props.lastbuildstate".
|
||||||
|
1>Done Building Project "D:\jbmod\props\props.vcxproj" (build target(s)).
|
||||||
|
|
||||||
|
Построение успешно завершено.
|
||||||
|
|
||||||
|
Time Elapsed 00:00:01.67
|
||||||
BIN
props/Debug/props.vcxprojResolveAssemblyReference.cache
Normal file
BIN
props/Debug/props.vcxprojResolveAssemblyReference.cache
Normal file
Binary file not shown.
100
props/Debug/props.write.1.tlog
Normal file
100
props/Debug/props.write.1.tlog
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
BIN
props/Debug/sigscan.obj
Normal file
BIN
props/Debug/sigscan.obj
Normal file
Binary file not shown.
BIN
props/Debug/vc100.idb
Normal file
BIN
props/Debug/vc100.idb
Normal file
Binary file not shown.
BIN
props/Debug/vc100.pdb
Normal file
BIN
props/Debug/vc100.pdb
Normal file
Binary file not shown.
BIN
props/Release/CL.read.1.tlog
Normal file
BIN
props/Release/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/CL.write.1.tlog
Normal file
BIN
props/Release/CL.write.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/cl.command.1.tlog
Normal file
BIN
props/Release/cl.command.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/extern.obj
Normal file
BIN
props/Release/extern.obj
Normal file
Binary file not shown.
BIN
props/Release/link.command.1.tlog
Normal file
BIN
props/Release/link.command.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/link.read.1.tlog
Normal file
BIN
props/Release/link.read.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/link.write.1.tlog
Normal file
BIN
props/Release/link.write.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/mt.command.1.tlog
Normal file
BIN
props/Release/mt.command.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/mt.read.1.tlog
Normal file
BIN
props/Release/mt.read.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/mt.write.1.tlog
Normal file
BIN
props/Release/mt.write.1.tlog
Normal file
Binary file not shown.
BIN
props/Release/plugin.obj
Normal file
BIN
props/Release/plugin.obj
Normal file
Binary file not shown.
22
props/Release/props.Build.CppClean.log
Normal file
22
props/Release/props.Build.CppClean.log
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
..\..\Steam\steamapps\common\Source SDK Base\bin\props.ilk
|
||||||
|
..\..\Steam\steamapps\common\Source SDK Base\bin\props.pdb
|
||||||
|
D:\jbmod\props\..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll
|
||||||
|
D:\jbmod\props\Release\cl.command.1.tlog
|
||||||
|
D:\jbmod\props\Release\CL.read.1.tlog
|
||||||
|
D:\jbmod\props\Release\CL.write.1.tlog
|
||||||
|
D:\JBMOD\PROPS\RELEASE\EXTERN.OBJ
|
||||||
|
D:\jbmod\props\Release\link.command.1.tlog
|
||||||
|
D:\jbmod\props\Release\link.read.1.tlog
|
||||||
|
D:\jbmod\props\Release\link.write.1.tlog
|
||||||
|
D:\jbmod\props\Release\mt.command.1.tlog
|
||||||
|
D:\jbmod\props\Release\mt.read.1.tlog
|
||||||
|
D:\jbmod\props\Release\mt.write.1.tlog
|
||||||
|
D:\JBMOD\PROPS\RELEASE\PLUGIN.OBJ
|
||||||
|
D:\JBMOD\PROPS\RELEASE\PROPS.DLL.INTERMEDIATE.MANIFEST
|
||||||
|
D:\jbmod\props\Release\props.write.1.tlog
|
||||||
|
D:\JBMOD\PROPS\RELEASE\SIGSCAN.OBJ
|
||||||
|
D:\JBMOD\PROPS\RELEASE\VC100.PDB
|
||||||
|
D:\STEAM\STEAMAPPS\COMMON\SOURCE SDK BASE\BIN\PROPS.DLL
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\STEAM\STEAMAPPS\COMMON\SOURCE SDK BASE\BIN\PROPS.PDB
|
||||||
10
props/Release/props.dll.intermediate.manifest
Normal file
10
props/Release/props.dll.intermediate.manifest
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||||
|
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges>
|
||||||
|
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
</assembly>
|
||||||
2
props/Release/props.lastbuildstate
Normal file
2
props/Release/props.lastbuildstate
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#v4.0:v100:false
|
||||||
|
Release|Win32|D:\jbmod\|
|
||||||
32
props/Release/props.log
Normal file
32
props/Release/props.log
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
Build started 05.03.2018 3:49:47.
|
||||||
|
1>Project "D:\jbmod\props\props.vcxproj" on node 2 (rebuild target(s)).
|
||||||
|
1>_PrepareForClean:
|
||||||
|
Deleting file "Release\props.lastbuildstate".
|
||||||
|
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(299,5): warning MSB8004: каталог Output заканчивается не косой чертой. Этот экземпляр построения добавит косую черту, поскольку она необходима для правильного определения каталога Output.
|
||||||
|
InitializeBuildStatus:
|
||||||
|
Creating "Release\props.unsuccessfulbuild" because "AlwaysCreate" was specified.
|
||||||
|
ClCompile:
|
||||||
|
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /ID:\source2006\game_shared /ID:\source2006\dlls /ID:\source2006\public\tier1 /ID:\source2006\public\tier0 /ID:\source2006\public /ID:\source2006\common /ID:\source2006\ /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D _WINDLL /D _MBCS /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt extern.cpp plugin.cpp sigscan.cpp
|
||||||
|
extern.cpp
|
||||||
|
plugin.cpp
|
||||||
|
sigscan.cpp
|
||||||
|
1>sigscan.cpp(15): warning C4018: <: несоответствие типов со знаком и без знака
|
||||||
|
1>sigscan.cpp(18): warning C4018: <: несоответствие типов со знаком и без знака
|
||||||
|
Link:
|
||||||
|
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll" /NOLOGO /LIBPATH:D:\source2006\lib\public mathlib.lib vstdlib.lib tier0.lib tier1.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NODEFAULTLIB:LIBCMT.lib /MANIFEST /ManifestFile:"Release\props.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\Steam\steamapps\common\Source SDK Base\bin\props.pdb" /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"..\..\Steam\steamapps\common\Source SDK Base\bin\props.lib" /MACHINE:X86 /DLL Release\extern.obj
|
||||||
|
Release\plugin.obj
|
||||||
|
Release\sigscan.obj
|
||||||
|
Создается библиотека ..\..\Steam\steamapps\common\Source SDK Base\bin\props.lib и объект ..\..\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
Создание кода
|
||||||
|
Создание кода завершено
|
||||||
|
props.vcxproj -> D:\jbmod\props\..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll
|
||||||
|
Manifest:
|
||||||
|
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:"..\..\Steam\steamapps\common\Source SDK Base\bin\props.dll;#2" /manifest Release\props.dll.intermediate.manifest
|
||||||
|
FinalizeBuildStatus:
|
||||||
|
Deleting file "Release\props.unsuccessfulbuild".
|
||||||
|
Touching "Release\props.lastbuildstate".
|
||||||
|
1>Done Building Project "D:\jbmod\props\props.vcxproj" (rebuild target(s)).
|
||||||
|
|
||||||
|
Построение успешно завершено.
|
||||||
|
|
||||||
|
Time Elapsed 00:00:03.88
|
||||||
5
props/Release/props.write.1.tlog
Normal file
5
props/Release/props.write.1.tlog
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
^D:\jbmod\props\props.vcxproj
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.lib
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
|
D:\Steam\steamapps\common\Source SDK Base\bin\props.exp
|
||||||
BIN
props/Release/sigscan.obj
Normal file
BIN
props/Release/sigscan.obj
Normal file
Binary file not shown.
BIN
props/Release/vc100.pdb
Normal file
BIN
props/Release/vc100.pdb
Normal file
Binary file not shown.
9
props/extern.cpp
Normal file
9
props/extern.cpp
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#define GAME_DLL
|
||||||
|
#include "cbase.h"
|
||||||
|
#include "engine/ienginetrace.h"
|
||||||
|
#include "tier1.h"
|
||||||
|
#include "convar.h"
|
||||||
|
|
||||||
|
/* util_shared.cpp */
|
||||||
|
void DebugDrawLine(const Vector&,const Vector&,int,int,bool,float){}
|
||||||
|
ConVar r_visualizetraces("","",0);
|
||||||
24
props/filter.h
Normal file
24
props/filter.h
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#ifndef __FILTER_H
|
||||||
|
#define __FILTER_H
|
||||||
|
|
||||||
|
#include "engine/ienginetrace.h"
|
||||||
|
|
||||||
|
class CLocalTraceFilter : public ITraceFilter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CLocalTraceFilter(IHandleEntity* pIgnore)
|
||||||
|
: m_pIgnore(pIgnore){}
|
||||||
|
|
||||||
|
virtual TraceType_t GetTraceType() const {
|
||||||
|
return TRACE_EVERYTHING;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool ShouldHitEntity(IHandleEntity* pEnt,
|
||||||
|
int content){
|
||||||
|
return (pEnt != m_pIgnore);
|
||||||
|
}
|
||||||
|
|
||||||
|
IHandleEntity* m_pIgnore;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
473
props/plugin.cpp
Normal file
473
props/plugin.cpp
Normal file
|
|
@ -0,0 +1,473 @@
|
||||||
|
#define GAME_DLL
|
||||||
|
#include "plugin.h"
|
||||||
|
#include "cbase.h"
|
||||||
|
#include "engine/iserverplugin.h"
|
||||||
|
#include "toolframework/itoolentity.h"
|
||||||
|
#include "filesystem.h"
|
||||||
|
#include "eiface.h"
|
||||||
|
#include "mathlib.h"
|
||||||
|
#include "tier1.h"
|
||||||
|
#include "strtools.h"
|
||||||
|
#include "datacache/imdlcache.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "props.h"
|
||||||
|
#include "filter.h"
|
||||||
|
|
||||||
|
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
CUtlSymbol name;
|
||||||
|
int iGroup;
|
||||||
|
Vector hull_min;
|
||||||
|
Vector hull_max;
|
||||||
|
} prop_t;
|
||||||
|
|
||||||
|
class CPluginProps : public IServerPluginCallbacks
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool Load(CreateInterfaceFn,CreateInterfaceFn);
|
||||||
|
virtual void Unload();
|
||||||
|
virtual void Pause(){}
|
||||||
|
virtual void UnPause(){}
|
||||||
|
virtual const char* GetPluginDescription(){
|
||||||
|
return "Props";
|
||||||
|
}
|
||||||
|
virtual void LevelInit(const char*){}
|
||||||
|
virtual void ServerActivate(edict_t*,int,int){}
|
||||||
|
virtual void GameFrame(bool){}
|
||||||
|
virtual void LevelShutdown(){}
|
||||||
|
virtual void ClientActive(edict_t*);
|
||||||
|
virtual void ClientDisconnect(edict_t*){}
|
||||||
|
virtual void ClientPutInServer(edict_t*,const char*){}
|
||||||
|
virtual void SetCommandClient(int iIndex){
|
||||||
|
m_iCommandIndex = iIndex;
|
||||||
|
}
|
||||||
|
virtual void ClientSettingsChanged(edict_t*){}
|
||||||
|
virtual PLUGIN_RESULT ClientConnect(bool*,edict_t*,const char*,
|
||||||
|
const char*,char*,int){return PLUGIN_CONTINUE;}
|
||||||
|
virtual PLUGIN_RESULT ClientCommand(edict_t*);
|
||||||
|
virtual PLUGIN_RESULT NetworkIDValidated(const char*,const char*){
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int AddGroup(const char* pName);
|
||||||
|
void GetProps(CUtlVector<int>& props,int iGroup);
|
||||||
|
void LoadModel(const char* pFolder,const char* pName);
|
||||||
|
int FindModel(const char* pName);
|
||||||
|
void SpawnProp(Vector vPos,prop_t& pr);
|
||||||
|
PLUGIN_RESULT ShowPropMenu(edict_t* pPly,int group,int index);
|
||||||
|
|
||||||
|
int m_iCommandIndex;
|
||||||
|
CUtlVector<CUtlSymbol> m_Groups;
|
||||||
|
CUtlVector<prop_t> m_Props;
|
||||||
|
} g_PluginProps;
|
||||||
|
|
||||||
|
EXPOSE_SINGLE_INTERFACE_GLOBALVAR(CPluginProps,IServerPluginCallbacks,
|
||||||
|
INTERFACEVERSION_ISERVERPLUGINCALLBACKS,g_PluginProps);
|
||||||
|
|
||||||
|
IVEngineServer* engine = NULL;
|
||||||
|
IEngineTrace* enginetrace = NULL;
|
||||||
|
IServerPluginHelpers* helpers = NULL;
|
||||||
|
IFileSystem* filesystem = NULL;
|
||||||
|
IMDLCache* mdlcache = NULL;
|
||||||
|
|
||||||
|
SetAllowPrecache_t pSAP = NULL;
|
||||||
|
DispatchSpawn_t pDP = NULL;
|
||||||
|
CreateEntityByName_t pCEBN = NULL;
|
||||||
|
bool* pAllowPrecache;
|
||||||
|
|
||||||
|
bool CPluginProps::Load(CreateInterfaceFn interfaces,CreateInterfaceFn game)
|
||||||
|
{
|
||||||
|
char szLine[MAX_PATH] = {0};
|
||||||
|
char szPath[MAX_PATH] = {0};
|
||||||
|
char* pFst;
|
||||||
|
|
||||||
|
ConnectTier1Libraries(&interfaces,1);
|
||||||
|
MathLib_Init(2.2f,2.2f,0.0f,2.0f);
|
||||||
|
|
||||||
|
if(!(engine = (IVEngineServer*)interfaces(INTERFACEVERSION_VENGINESERVER,0))
|
||||||
|
|| !(enginetrace = (IEngineTrace*)interfaces(INTERFACEVERSION_ENGINETRACE_SERVER,0))
|
||||||
|
|| !(helpers = (IServerPluginHelpers*)interfaces(INTERFACEVERSION_ISERVERPLUGINHELPERS,0))
|
||||||
|
|| !(filesystem = (IFileSystem*)interfaces(FILESYSTEM_INTERFACE_VERSION,0))
|
||||||
|
|| !(mdlcache = (IMDLCache*)interfaces(MDLCACHE_INTERFACE_VERSION,0)))
|
||||||
|
{
|
||||||
|
Warning("Failed to load due interface mismatch!\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(pFst = (char*)SigScan("server.dll",SAP_SIG,SAP_MASK)))
|
||||||
|
{
|
||||||
|
Warning("Failed to find sig SAP!\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
pSAP = (SetAllowPrecache_t)JMP2PTR(pFst);
|
||||||
|
pAllowPrecache = *(bool**)((char*)pSAP+0x05);
|
||||||
|
|
||||||
|
if(!(pDP = (DispatchSpawn_t)SigScan("server.dll",DP_SIG,DP_MASK)))
|
||||||
|
{
|
||||||
|
Warning("Failed to find sig DP!\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(pCEBN = (CreateEntityByName_t)SigScan("server.dll",CEBN_SIG,CEBN_MASK)))
|
||||||
|
{
|
||||||
|
Warning("Failed to find sig CEBN!\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
KeyValues* pProps = new KeyValues("Props");
|
||||||
|
if(!(pProps->LoadFromFile(filesystem,"addons/props.txt","GAME")))
|
||||||
|
{
|
||||||
|
Warning("File addons/props.txt not found!\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
KeyValues* pV = pProps->GetFirstSubKey();
|
||||||
|
do {
|
||||||
|
KeyValues* pK = pV->GetFirstValue();
|
||||||
|
do {
|
||||||
|
LoadModel(pV->GetName(),pK->GetString());
|
||||||
|
} while((pK=pK->GetNextValue()));
|
||||||
|
} while((pV=pV->GetNextKey()));
|
||||||
|
pProps->deleteThis();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CPluginProps::AddGroup(const char* pName)
|
||||||
|
{
|
||||||
|
int index = -1;
|
||||||
|
for(int i = 0; i < m_Groups.Count(); i++)
|
||||||
|
{
|
||||||
|
if(FStrEq(m_Groups[i].String(),pName))
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(index == -1)
|
||||||
|
index = m_Groups.AddToTail(CUtlSymbol(pName));
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPluginProps::GetProps(CUtlVector<int>& props,int iGroup)
|
||||||
|
{
|
||||||
|
for(int i = 0; i < m_Props.Count(); i++)
|
||||||
|
{
|
||||||
|
if(m_Props[i].iGroup == iGroup)
|
||||||
|
props.AddToTail(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPluginProps::LoadModel(const char* pFolder,const char* pName)
|
||||||
|
{
|
||||||
|
char szBuf[MAX_PATH] = {0};
|
||||||
|
char szBuf2[MAX_PATH] = {0};
|
||||||
|
prop_t prop;
|
||||||
|
|
||||||
|
strcpy_s(szBuf2,pName);
|
||||||
|
V_strcpy(szBuf,"models/");
|
||||||
|
strcat_s(szBuf,szBuf2);
|
||||||
|
|
||||||
|
if(!filesystem->FileExists(szBuf,"GAME"))
|
||||||
|
{
|
||||||
|
Warning("Model %s doesn't exists!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MDLCACHE_CRITICAL_SECTION();
|
||||||
|
MDLHandle_t mdl = mdlcache->FindMDL(szBuf);
|
||||||
|
if(mdl == MDLHANDLE_INVALID)
|
||||||
|
{
|
||||||
|
Warning("Model %s not found!\n",szBuf);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
studiohdr_t* pHdr = mdlcache->GetStudioHdr(mdl);
|
||||||
|
if(!pHdr)
|
||||||
|
{
|
||||||
|
Warning("Model %s doesn't have vphysics!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add group */
|
||||||
|
prop.name = CUtlSymbol(szBuf2);
|
||||||
|
prop.iGroup = AddGroup(pFolder);
|
||||||
|
prop.hull_min = pHdr->hull_min;
|
||||||
|
prop.hull_max = pHdr->hull_max;
|
||||||
|
m_Props.AddToTail(prop);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPluginProps::Unload()
|
||||||
|
{
|
||||||
|
DisconnectTier1Libraries();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPluginProps::ClientActive(edict_t* pPly)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
KeyValues *kv = new KeyValues( "msg" );
|
||||||
|
kv->SetString( "title", "Hello" );
|
||||||
|
kv->SetString( "msg", "Hello there" );
|
||||||
|
kv->SetColor( "color", Color( 255, 0, 0, 255 ));
|
||||||
|
kv->SetInt( "level", 5);
|
||||||
|
kv->SetInt( "time", 10);
|
||||||
|
helpers->CreateMessage( pEntity, DIALOG_MSG, kv, this );
|
||||||
|
kv->deleteThis();
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QAngle* GetEntityEyes(CBaseEntity* pEnt)
|
||||||
|
{
|
||||||
|
QAngle* pRet;
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
push ecx
|
||||||
|
push edx
|
||||||
|
|
||||||
|
mov ecx,[pEnt]
|
||||||
|
mov edx,[ecx]
|
||||||
|
call dword ptr [edx+0x1A8]
|
||||||
|
mov [pRet],eax
|
||||||
|
|
||||||
|
pop edx
|
||||||
|
pop ecx
|
||||||
|
}
|
||||||
|
return pRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void GetEyePosition(CBaseEntity* pEnt,Vector* vOut)
|
||||||
|
{
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
push ecx
|
||||||
|
push edx
|
||||||
|
|
||||||
|
push [vOut]
|
||||||
|
mov ecx,[pEnt]
|
||||||
|
mov edx,[ecx]
|
||||||
|
call dword ptr [edx+0x1A4]
|
||||||
|
|
||||||
|
pop edx
|
||||||
|
pop ecx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline PLUGIN_RESULT CPluginProps::ShowPropMenu(edict_t* pPly,int group,int index)
|
||||||
|
{
|
||||||
|
const int iSize = 9;
|
||||||
|
const int mSize = 7;
|
||||||
|
char szBuf[MAX_PATH];
|
||||||
|
|
||||||
|
CUtlVector<int> props;
|
||||||
|
KeyValues* msg = new KeyValues("menu");
|
||||||
|
GetProps(props,group);
|
||||||
|
|
||||||
|
msg->SetString("title","Prop menu");
|
||||||
|
msg->SetString("msg","Prop menu");
|
||||||
|
msg->SetInt("level",5);
|
||||||
|
msg->SetInt("time",9999);
|
||||||
|
msg->SetColor("color",Color(255,255,0,255));
|
||||||
|
|
||||||
|
for(int i = index; i < MIN(index+mSize,props.Count()); i++)
|
||||||
|
{
|
||||||
|
if(!props.IsValidIndex(i) || !m_Props.IsValidIndex(props[i]))
|
||||||
|
continue;
|
||||||
|
prop_t& pr = m_Props[props[i]];
|
||||||
|
Q_snprintf(szBuf,MAX_PATH,"%d",i-index+1);
|
||||||
|
KeyValues* sub = msg->FindKey(szBuf,true);
|
||||||
|
|
||||||
|
char* pPtr = strchr((char*)pr.name.String(),'/');
|
||||||
|
if(!pPtr) continue;
|
||||||
|
pPtr++;
|
||||||
|
sub->SetString("msg",pPtr);
|
||||||
|
|
||||||
|
Q_snprintf(szBuf,MAX_PATH,"prop_spawn %s %s %d",
|
||||||
|
pr.name.String(),engine->Cmd_Argv(1),index);
|
||||||
|
sub->SetString("command",szBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(props.Count()-index>=mSize)
|
||||||
|
{
|
||||||
|
KeyValues* next = msg->FindKey("8",true);
|
||||||
|
next->SetString("msg","Next");
|
||||||
|
Q_snprintf(szBuf,MAX_PATH,"prop_spawnmenu2 %s %d",
|
||||||
|
engine->Cmd_Argv(1),index+mSize);
|
||||||
|
next->SetString("command",szBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(index)
|
||||||
|
{
|
||||||
|
KeyValues* back = msg->FindKey("9",true);
|
||||||
|
back->SetString("msg","Back");
|
||||||
|
Q_snprintf(szBuf,MAX_PATH,"prop_spawnmenu2 %s %d",
|
||||||
|
engine->Cmd_Argv(1),index-mSize);
|
||||||
|
back->SetString("command",szBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
helpers->CreateMessage(pPly,DIALOG_MENU,msg,this);
|
||||||
|
msg->deleteThis();
|
||||||
|
return PLUGIN_STOP;
|
||||||
|
}
|
||||||
|
|
||||||
|
PLUGIN_RESULT CPluginProps::ClientCommand(edict_t* pPly)
|
||||||
|
{
|
||||||
|
const char* pCmd = engine->Cmd_Argv(0);
|
||||||
|
const int iSize = 9;
|
||||||
|
const int mSize = 7;
|
||||||
|
char szBuf[MAX_PATH];
|
||||||
|
|
||||||
|
if(FStrEq(pCmd,"prop_spawn"))
|
||||||
|
{
|
||||||
|
if(engine->Cmd_Argc()<2)
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
CBaseEntity* pPlayer = pPly->
|
||||||
|
GetIServerEntity()->GetBaseEntity();
|
||||||
|
if(!pPlayer) return PLUGIN_CONTINUE;
|
||||||
|
|
||||||
|
int iProp = FindModel(engine->Cmd_Argv(1));
|
||||||
|
if(iProp == -1) return PLUGIN_STOP;
|
||||||
|
prop_t& pr = m_Props[iProp];
|
||||||
|
|
||||||
|
Ray_t ray;
|
||||||
|
trace_t tr;
|
||||||
|
Vector vForward,vEye;
|
||||||
|
QAngle* pAng = GetEntityEyes(pPlayer);
|
||||||
|
AngleVectors(*pAng,&vForward);
|
||||||
|
GetEyePosition(pPlayer,&vEye);
|
||||||
|
|
||||||
|
CLocalTraceFilter filter(pPlayer);
|
||||||
|
ray.Init(vEye,vEye+(vForward*MAX_TRACE_LENGTH),pr.hull_min,pr.hull_max);
|
||||||
|
enginetrace->TraceRay(ray,MASK_SOLID,&filter,&tr);
|
||||||
|
|
||||||
|
if(tr.fraction != 1.0)
|
||||||
|
SpawnProp(tr.endpos,pr);
|
||||||
|
|
||||||
|
if(engine->Cmd_Argc() == 4)
|
||||||
|
{
|
||||||
|
ShowPropMenu(pPly,atoi(engine->Cmd_Argv(2)),
|
||||||
|
atoi(engine->Cmd_Argv(3)));
|
||||||
|
}
|
||||||
|
return PLUGIN_STOP;
|
||||||
|
}
|
||||||
|
else if(FStrEq(pCmd,"prop_spawnmenu"))
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
if(engine->Cmd_Argc() == 2)
|
||||||
|
index = atoi(engine->Cmd_Argv(1));
|
||||||
|
KeyValues* msg;
|
||||||
|
|
||||||
|
msg = new KeyValues("menu");
|
||||||
|
msg->SetString("title","Spawn menu");
|
||||||
|
msg->SetString("msg","Spawn menu");
|
||||||
|
msg->SetInt("level",4);
|
||||||
|
msg->SetInt("time",9999);
|
||||||
|
msg->SetColor("color",Color(255,255,0,255));
|
||||||
|
|
||||||
|
for(int i = index; i < MIN((index+mSize),m_Groups.Count()); i++)
|
||||||
|
{
|
||||||
|
Q_snprintf(szBuf,MAX_PATH,"%d",i-index+1);
|
||||||
|
KeyValues* pVal = msg->FindKey(szBuf,true);
|
||||||
|
pVal->SetString("msg",m_Groups[i].String());
|
||||||
|
Q_snprintf(szBuf,MAX_PATH,"prop_spawnmenu2 %d",i);
|
||||||
|
pVal->SetString("command",szBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((m_Groups.Count()-index)>=mSize)
|
||||||
|
{
|
||||||
|
KeyValues* next = msg->FindKey("8",true);
|
||||||
|
Q_snprintf(szBuf,MAX_PATH,"prop_spawnmenu %d",index+mSize);
|
||||||
|
next->SetString("msg","Next");
|
||||||
|
next->SetString("command",szBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(index)
|
||||||
|
{
|
||||||
|
KeyValues* back = msg->FindKey("9",true);
|
||||||
|
Q_snprintf(szBuf,MAX_PATH,"prop_spawnmenu %d",index-mSize);
|
||||||
|
back->SetString("msg","Back");
|
||||||
|
back->SetString("command",szBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
helpers->CreateMessage(pPly,DIALOG_MENU,msg,this);
|
||||||
|
msg->deleteThis();
|
||||||
|
return PLUGIN_STOP;
|
||||||
|
}
|
||||||
|
else if(FStrEq(pCmd,"prop_spawnmenu2"))
|
||||||
|
{
|
||||||
|
if(engine->Cmd_Argc()<2)
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
if(engine->Cmd_Argc()==2)
|
||||||
|
return ShowPropMenu(pPly,atoi(engine->Cmd_Argv(1)),0);
|
||||||
|
if(engine->Cmd_Argc()>2)
|
||||||
|
{
|
||||||
|
return ShowPropMenu(pPly,atoi(engine->Cmd_Argv(1)),
|
||||||
|
atoi(engine->Cmd_Argv(2)));
|
||||||
|
}
|
||||||
|
return PLUGIN_STOP;
|
||||||
|
}
|
||||||
|
return PLUGIN_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CPluginProps::FindModel(const char* pName)
|
||||||
|
{
|
||||||
|
for(int i = 0; i < m_Props.Count(); i++)
|
||||||
|
{
|
||||||
|
if(FStrEq(m_Props[i].name.String(),pName))
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EntityKeyValue(CBaseEntity* pEnt,
|
||||||
|
const char* pKey,const char* pValue)
|
||||||
|
{
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
push ecx
|
||||||
|
push edx
|
||||||
|
|
||||||
|
push [pValue]
|
||||||
|
push [pKey]
|
||||||
|
mov ecx,[pEnt]
|
||||||
|
mov edx,[ecx]
|
||||||
|
call dword ptr [edx+0x78]
|
||||||
|
|
||||||
|
pop edx
|
||||||
|
pop ecx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPluginProps::SpawnProp(Vector vPos,prop_t& pr)
|
||||||
|
{
|
||||||
|
char szBuf[MAX_PATH];
|
||||||
|
CPhysicsProp* pProp;
|
||||||
|
bool bPrecace = *pAllowPrecache;
|
||||||
|
*pAllowPrecache = true;
|
||||||
|
|
||||||
|
pProp = (CPhysicsProp*)pCEBN("prop_physics",-1);
|
||||||
|
if(pProp)
|
||||||
|
{
|
||||||
|
//%.10f %.10f %.10f
|
||||||
|
Q_snprintf(szBuf,sizeof(szBuf),"%.10f %.10f %.10f",vPos.x,vPos.y,vPos.z);
|
||||||
|
EntityKeyValue(pProp,"origin",szBuf);
|
||||||
|
Q_snprintf(szBuf,sizeof(szBuf),"%.10f %.10f %.10f",0.0f,0.0f,0.0f);
|
||||||
|
EntityKeyValue(pProp,"angles",szBuf);
|
||||||
|
|
||||||
|
szBuf[0] = '\0';
|
||||||
|
strcpy(szBuf,"models/");
|
||||||
|
strcat_s(szBuf,pr.name.String());
|
||||||
|
EntityKeyValue(pProp, "model", szBuf );
|
||||||
|
EntityKeyValue(pProp, "solid","6");
|
||||||
|
EntityKeyValue(pProp, "fademindist","-1");
|
||||||
|
EntityKeyValue(pProp, "fademaxdist","0");
|
||||||
|
EntityKeyValue(pProp, "fadescale","1");
|
||||||
|
EntityKeyValue(pProp, "inertiaScale","1.0");
|
||||||
|
EntityKeyValue(pProp, "physdamagescale","0.1");
|
||||||
|
pProp->Precache();
|
||||||
|
pDP(pProp);
|
||||||
|
pProp->Activate();
|
||||||
|
}
|
||||||
|
*pAllowPrecache = false;
|
||||||
|
}
|
||||||
21
props/plugin.h
Normal file
21
props/plugin.h
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef __PLUGIN_H
|
||||||
|
#define __PLUGIN_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define JMP2PTR(ptr) ((char*)ptr+5+((ptrdiff_t)*(ULONG*)((char*)ptr+1)))
|
||||||
|
typedef void (*SetAllowPrecache_t)(bool);
|
||||||
|
#define SAP_SIG "\xE8\x00\x00\x00\x00\x8B\x0D\x00\x00\x00\x00\x8B\x11\x83\xC4\x04\x6A\xFF\x6A\x01\xFF\x92\xC8\x00\x00\x00"
|
||||||
|
#define SAP_MASK "x????xx????xxxxxxxxxxxxxxx"
|
||||||
|
|
||||||
|
#define DP_SIG "\x53\x56\x8B\x74\x24\x0C\x85\xF6\x57\x0F\x84\x00\x00\x00\x00"
|
||||||
|
#define DP_MASK "xxxxxxxxxxx????"
|
||||||
|
typedef int (*DispatchSpawn_t)(void*);
|
||||||
|
|
||||||
|
#define CEBN_SIG "\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x25\x8B\x0D\x00\x00\x00\x00\x8B\x01\x56\xFF\x50\x54\x85\xC0\xA3\x00\x00\x00\x00\x75\x10"
|
||||||
|
#define CEBN_MASK "xxxxxxxxxxxxxxxxx????xxxxxxxxx????xx"
|
||||||
|
typedef void* (*CreateEntityByName_t)(const char*,int);
|
||||||
|
|
||||||
|
void* SigScan(const char* pMod,const char* pSig,const char* pMask);
|
||||||
|
|
||||||
|
#endif
|
||||||
87
props/props.vcxproj
Normal file
87
props/props.vcxproj
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{1C95495F-E6A5-4F65-B54F-9E8044AC0903}</ProjectGuid>
|
||||||
|
<RootNamespace>props</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<OutDir>..\..\Steam\steamapps\common\Source SDK Base\bin</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<OutDir>..\..\Steam\steamapps\common\Source SDK Base\bin</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>D:\source2006\game_shared;D:\source2006\dlls;D:\source2006\public\tier1;D:\source2006\public\tier0;D:\source2006\public;D:\source2006\common;D:\source2006\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>D:\source2006\lib\public;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>mathlib.lib;vstdlib.lib;tier0.lib;tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<AdditionalIncludeDirectories>D:\source2006\game_shared;D:\source2006\dlls;D:\source2006\public\tier1;D:\source2006\public\tier0;D:\source2006\public;D:\source2006\common;D:\source2006\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<AdditionalDependencies>mathlib.lib;vstdlib.lib;tier0.lib;tier1.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<IgnoreSpecificDefaultLibraries>LIBCMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<AdditionalLibraryDirectories>D:\source2006\lib\public;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="extern.cpp" />
|
||||||
|
<ClCompile Include="plugin.cpp" />
|
||||||
|
<ClCompile Include="sigscan.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="filter.h" />
|
||||||
|
<ClInclude Include="plugin.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
36
props/props.vcxproj.filters
Normal file
36
props/props.vcxproj.filters
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Файлы исходного кода">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Заголовочные файлы">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Файлы ресурсов">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="plugin.cpp">
|
||||||
|
<Filter>Файлы исходного кода</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="sigscan.cpp">
|
||||||
|
<Filter>Файлы исходного кода</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="extern.cpp">
|
||||||
|
<Filter>Файлы исходного кода</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="plugin.h">
|
||||||
|
<Filter>Заголовочные файлы</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="filter.h">
|
||||||
|
<Filter>Заголовочные файлы</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
3
props/props.vcxproj.user
Normal file
3
props/props.vcxproj.user
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
26
props/sigscan.cpp
Normal file
26
props/sigscan.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#include "plugin.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
void* SigScan(const char* pMod,const char* pSig,const char* pMask)
|
||||||
|
{
|
||||||
|
size_t uSigLen = strlen(pMask);
|
||||||
|
char* pBegin = (char*)GetModuleHandle(pMod);
|
||||||
|
size_t uLen;
|
||||||
|
|
||||||
|
PIMAGE_DOS_HEADER pDos = (PIMAGE_DOS_HEADER)pBegin;
|
||||||
|
PIMAGE_NT_HEADERS pNt = (PIMAGE_NT_HEADERS)((char*)pDos+pDos->e_lfanew);
|
||||||
|
uLen = pNt->OptionalHeader.SizeOfCode-uSigLen;
|
||||||
|
pBegin = (char*)pDos+pNt->OptionalHeader.BaseOfCode;
|
||||||
|
|
||||||
|
for(int i = 0; i < uLen; i++)
|
||||||
|
{
|
||||||
|
int j;
|
||||||
|
for(j = 0; j < uSigLen; j++)
|
||||||
|
{
|
||||||
|
if(pBegin[i+j] != pSig[j] && pMask[j] == 'x')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(j==uSigLen) return &pBegin[i];
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue