Help with CoC-Xray source. [Solved]

spikensbror
Scavenger
Posts: 8
Joined: 25 Mar 2017, 13:27

Help with CoC-Xray source. [Solved]

Postby spikensbror » 27 Mar 2017, 17:10

Hey all,

As the subject states, the loading time is drastically longer (3-5 minutes) when using binaries that I've built myself in comparison with the binaries supplied with the latest release of CoC.

Could anyone point me in the right direction of what the issue might be? I've scoured the commit-log considering some changes have been made since latest patch but can't find any obvious cause. Maybe Alundaio has some secret build profile up his sleeve? ;)
Last edited by spikensbror on 02 Apr 2017, 14:57, edited 2 times in total.

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1371
Joined: 26 May 2012, 22:26

Re: Loading time issue with binaries built from CoC-Xray source.

Postby Alundaio » 27 Mar 2017, 21:33

Are you using the binaries with CoC or with CoP?

CoC loads faster then CoP for other reasons not related to the binaries. The main problem with cop is the poorly written gulag_general.script which considerably increases loading times. String concatenation in lua is very costly and it's used excessively in this script, which is called every time the game is loading.

If you have this problem on CoC, then I'm not sure what the reasons could be.
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

spikensbror
Scavenger
Posts: 8
Joined: 25 Mar 2017, 13:27

Re: Loading time issue with binaries built from CoC-Xray source.

Postby spikensbror » 28 Mar 2017, 08:24

I'm running them with CoC, that's the weird thing. I've got the original binaries in bin\ and the freshly built ones in bin_rel\ and I just switch between them to reproduce the problem.

I've compared log files from both and the phase time entries from the bin\ ones are at around 200ms while on the new binaries they are at 8000ms. Could it maybe be that our libraries are different? That I somehow got debug .lib files?

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1371
Joined: 26 May 2012, 22:26

Re: Loading time issue with binaries built from CoC-Xray source.

Postby Alundaio » 28 Mar 2017, 10:18

You built solution as Release/win32, right? Did you have any problems at all compiling?
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

spikensbror
Scavenger
Posts: 8
Joined: 25 Mar 2017, 13:27

Re: Loading time issue with binaries built from CoC-Xray source.

Postby spikensbror » 28 Mar 2017, 10:36

Yes, built it as Release/Win32. I'm also having some stranger issues. It seems like the "actor_on_before_death" callback is not invoked, nor is CActor::Die(). The direct effect of this is that I'm stuck in first person view after dying in-game and it doesn't show the "Lost to the Zone" text nor change to third-person view.

To get it to build I did the following things:

  • Updated "codec.h", "vorbisenc.h" and "vorbisfile.h" in "sdk/include/vorbis" to version 1.3.5 of libvorbis.
  • Add "lib" folder from libvorbis-1.3.5 to "sdk/include/vorbis".
  • Add "lib" folder from libtheora-1.1.1 to "sdk/include/theora".
  • Add "d3dx9.lib", "d3dx10.lib", "d3dx11.lib" and "dxerr.lib" from DirectX SDK (June 2010) to "sdk/libraries".
  • Add "nvapi.lib" to "sdk/libraries".
  • Change "E:\STALKER\X-Ray Source\x_ray_1602_VS13\xray-16\src\3rd party" to "$(SolutionDir)3rd party" in "src/Common.props" for the include paths.

To get it running properly I had to remove everything related to guidShaderReflection in r4.cpp and replace it with IID_ID3DShaderReflection.

spikensbror
Scavenger
Posts: 8
Joined: 25 Mar 2017, 13:27

Re: Loading time issue with binaries built from CoC-Xray source.

Postby spikensbror » 30 Mar 2017, 12:17

Sorry for double post. I managed to get it working as intended. I neglected to download the latest asset repack, and ran with 1.4.22 resources which obviously is a nono.

I'm having new issues though. It appears that the github code is not entirely up to date as I'm getting crashes that various lua exports are missing. Among these are "cast_Ammo" and "cast_WeaponMagazined". Could you push these changes by any chance to the repository? I am currently running of the "working" branch.

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1371
Joined: 26 May 2012, 22:26

Re: Help with CoC-Xray source. [Load issues solved, need more help]

Postby Alundaio » 31 Mar 2017, 18:56

Okay I will push them but I was waiting to document some changes, but I will do it later.


Don't worry about double post, there is no silly rules like that here.

EDIT:

Working branch
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

spikensbror
Scavenger
Posts: 8
Joined: 25 Mar 2017, 13:27

Re: Help with CoC-Xray source. [Load issues solved, need more help]

Postby spikensbror » 31 Mar 2017, 20:03

Thanks a ton, looking forward to dive into it!


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest

cron