revolucas / coc-xray Goto Github PK
View Code? Open in Web Editor NEWModified X-Ray engine for Call of Chernobyl
License: Other
Modified X-Ray engine for Call of Chernobyl
License: Other
Blending is not as good as it used to be or at least is more noticeable. Animations seems to skip final frame. This appears to be the case for all animations, from creature to weapon.
Steps to reproduce:
Solution:
The problem appears because CSE_ALifeItemWeapon class has no field to store scope type. Gunslinger mod uses bithacking of m_addon_flags field (writing scope index into the left 5 bits of the field in net_Destroy). This way provides best compatibility with original game, but leads to some restrictions (up to 32 types of scopes) and not fully proper.
More correct way is to extend CSE_ALifeItemWeapon with extra field and export/import data from it when the weapon spawns/destroys. The problem is that such fix could conflict with some game's or mod's content.
P.S. The same bug you could see with ammos in the mag (if the weapon has different ammo types loaded). Moreover, info about types is losing during simple game saving and loading! It allows cheating with transformation cartridges from one type to another.
I need someone more experienced to fix or tell me why when passing an invalid or unexpected type to engine function, lua script just silently stops working without warning or error, making it extremely difficult to detect this kind of mistake or error.
For example, when doing something like:
db.actor:give_game_news("test_caption", "text", nil, 500, 10, 1)
If passing nil instead of a string for the third param, game will run fine, except whatever script this occurred in just stops working without warning. Is there a way to error check this?
`stack trace:
0023:041E430A xrRender_R1.dll, CLightProjector::calculate(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\layers\xrrenderpc_r1\lightprojector.cpp, 182
0023:041D75D0 xrRender_R1.dll, CRender::Calculate(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\layers\xrrenderpc_r1\fstaticrender.cpp, 537
0023:0042ACE8 xrEngine.exe, IGame_Level::OnRender(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\igame_level.cpp, 167
0023:049B73A9 xrGame.dll, CLevel::OnRender(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrgame\level.cpp, 692
0023:0041109C xrEngine.exe, CRegistrator::Process(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\pure.h, 90
0023:00410872 xrEngine.exe, CRenderDevice::on_idle(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\device.cpp, 291
0023:004109EA xrEngine.exe, CRenderDevice::message_loop(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\device.cpp, 345
0023:00410B0E xrEngine.exe, CRenderDevice::Run(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\device.cpp, 395
0023:004650ED xrEngine.exe, Startup(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\x_ray.cpp, 390
0023:00465873 xrEngine.exe, WinMain_impl(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\x_ray.cpp, 889
0023:00465976 xrEngine.exe, WinMain(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\x_ray.cpp, 958
0023:0047157B xrEngine.exe, __tmainCRTStartup(), f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c, 618
0023:77367C04 KERNEL32.DLL, BaseThreadInitThunk()
0023:775BAD1F ntdll.dll, RtlInitializeExceptionChain()
0023:775BACEA ntdll.dll, RtlInitializeExceptionChain()
[error][ 87] : The parameter is incorrect.
`
When switching to another renderer from r1 and trying to load a game
Posting here if anyone wants to fix something.
other changes or stuff that should be added:
Multiplayer code should be eliminated and M_UPDATE message should instead have Client object change Server object directly instead of through the faulty packet messaging system. Eliminating the requirement to read Update packet from all.spawn and save would open up the possibility to modify or add new server entity classes without it being a huge hassle. It would also lessen the chances of save corruption.
Several server entity classes aren't appropriately storing data and it is lost when client object is switched offline. For example, condition does not save for anything but Weapons, even though condition is written through STATE_Write. Another example: #7
The proper way to fix this would require the ability to compile all level editor tools, which does not work in this repo. But since CoC will never work for multiplayer, the solution would be to just track and modify server entity through client object, which is what is done in script side, anyway.
Hi!
I'm currently playing the CoP Anomaly mod.
I've come across some annoying behavior:
In combat, when I hide (They stop seeing me), it happens that the NPCs instantly abandon their position and start walking like zombies towards me. It's annoying, because I can hide just a few seconds and I know that in a few moments I'll have them a few meters away, being easy to eliminate them with a shotgun.
Does anyone know in which script/file, I can create a ramdom time so that the NPCs take some time to get out of their openings to me?
I've been looking all over the Internet for someone to help me change this behavior, and I haven't found anyone to help me.
Here's the git: https://github.com/mora145/Anomaly-Vanilla-Files
A screenshot: http://prntscr.com/sbo9pd
I cannot figure out how to fix vehicle spawning. If you spawn by script, the vehicle is fine until it goes offline, the pshell/mesh xform seem to be unaligned. If you spawn through all.spawn and vehicle is not facing the exact direction it faces in Actor Editor, it will be unaligned. Which means that, if not appropriately aligned, that car will drive backwards when you accelerate forward and visa versa. This carries over to AI car, to the point were it don't work at all because ph_car.script gets stuck and stops.
I tried using correct_spawn_pos method on net spawn and net update, it doesn't seem to fix it.
stack traceback:
d:\game\gamedata\scripts_g.script:854: in function 'callstack'
d:\game\gamedata\scripts\sim_board.script:322: in function 'enter_smart'
d:\game\gamedata\scripts\smart_terrain.script:1386: in function 'call_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1408: in function 'try_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1022: in function 'update'
d:\game\gamedata\scripts\bind_smart_terrain.script:69: in function <d:\game\gamedata\scripts\bind_smart_terrain.script:66>
[C]: in function 'set_callback'
d:\game\gamedata\scripts\bind_stalker.script:144: in function <d:\game\gamedata\scripts\bind_stalker.script:124>
2
stack traceback:
d:\game\gamedata\scripts_g.script:854: in function 'callstack'
d:\game\gamedata\scripts\sim_board.script:322: in function 'enter_smart'
d:\game\gamedata\scripts\smart_terrain.script:1386: in function 'call_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1408: in function 'try_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1022: in function 'update'
d:\game\gamedata\scripts\bind_smart_terrain.script:69: in function <d:\game\gamedata\scripts\bind_smart_terrain.script:66>
[C]: in function 'set_callback'
d:\game\gamedata\scripts\bind_stalker.script:144: in function <d:\game\gamedata\scripts\bind_stalker.script:124>
2
stack traceback:
d:\game\gamedata\scripts_g.script:854: in function 'callstack'
d:\game\gamedata\scripts\sim_board.script:322: in function 'enter_smart'
d:\game\gamedata\scripts\smart_terrain.script:1386: in function 'call_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1408: in function 'try_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1022: in function 'update'
d:\game\gamedata\scripts\bind_smart_terrain.script:69: in function <d:\game\gamedata\scripts\bind_smart_terrain.script:66>
[C]: in function 'set_callback'
d:\game\gamedata\scripts\bind_stalker.script:144: in function <d:\game\gamedata\scripts\bind_stalker.script:124>
! [SCRIPT ERROR]: d:\game\gamedata\scripts\smart_terrain_control.script:65: attempt to index field 'actor' (a nil value)
FATAL ERROR
[error]Expression :
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 189
[error]Description : fatal error
[error]Arguments : LUA error: d:\game\gamedata\scripts\smart_terrain_control.script:65: attempt to index field 'actor' (a nil value)
stack trace:
0023:022A394C xrCore.dll, xrDebug::fatal(), i:\coc-xray-working\src\xrcore\xrdebugnew.cpp, 411
0023:0A7333E2 xrGame.dll, CScriptEngine::lua_error(), i:\coc-xray-working\src\xrserverentities\script_engine.cpp, 189
0023:0AA9BA59 xrGame.dll, luabind::class_<CScriptXmlInit,luabind::detail::unspecified,luabind::detail::unspecified,luabind::detail::unspecified>::virtual_def<CUICheckButton * (__thiscall CScriptXmlInit::*)(char const *,CUIWindow *),luabind::detail::null_type>(), i:\coc-xray-working\src\3rd party\luabind\luabind\class.hpp, 1207
In the step: 2. Under User Macros, change xrSdkLibDir to point to the downloaded SDK Libraries
Where is the xrSdkLibDir macro in Visual Studio 2017?
Works correctly for World mesh. But it does not work correctly for HUD.
Do you also get >4000 warnings when compiling?
not sure where to raise this, but it would be awesome to implement a coop game mode
Look at GetBriefInfo function starting from line 944:
https://github.com/revolucas/CoC-Xray/blob/master/src/xrGame/WeaponMagazinedWGrenade.cpp#L944
I think there's unintended code. This starts from this commit: c3f8336
CoC-Xray/src/xrGame/InventoryOwner.h
Line 118 in 89695ee
Think it's better to initialize it in the constructor (like previous ones) to avoid UB.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.