As far as I remember this is caused by the modelindex being an unsigned 8-bit integer, but getting networked as signed 8-bit integer. So any modelindex above 127 leads to an overflow and the client gets a CM_InlineModel() error. The only way to prevent that error on the serverside is to remove any entity with a submodel > 127. So you got to remove all trigger_* and func_* with the model value "*128" and higher.

Regarding SPMaps you should also remove all target_speaker without a noise.

There was a third thing that kicked clients (for instance when you come close to the lightsaber's cage on yavin_trial), but I don't remember what exactly it was. I think it was related to entities with a "loopsound" that kicked clients out of the server, when they were triggered.

Note: someone asked my why not just increasing MAX_SUBMODELS, i dont remember today, but just increased didnt worked to load SP maps properly.

about the target speaker thingy (to get the others maps with no MAX_SUBMODELS error working, clients dont need to download nothing), look at g_target.c (on game code) in the SP_target_speaker function
change

Tr!Force, he was not asking how to "bypass" the amount of submodels on both ends, but how to solve the CM_InlineModel (bad number) error. Your last codepiece however removed all entities with subModels > 127, so that is exactly what he needs to do in a mod. I think my approach for that looked roughly like that:

the -8 tells the game to interpret it as signed 8 bit. If they actually made that 8 instead of -8 we could use the full 256 submodels. And when making a jk2 version with more submodels one should also increase the amount of networked bits, but that makes that version of jk2 incompatible to normal jk2. :/

I once tried to make a clientside that reads modelindex as 8-bit unsigned and my client could use the full 256 submodels, even on basejk servers trying to load those SPMaps. However some other parts of the code (like dismember) work with negative modelindex values, so changing the networking from "-8" to "8" is probably going to cause other side-effects and that's the reason we haven't done that in jk2mv.

But I had an idea for a work-around in cgame that might make the full 256 submodels usable, by assuming that negative modelindexes are overflows when loading subModels (cause negative subModels don't exist) and correcting them after getting them. Would be "hacky", but could actually work. If I get to try that I am probably going to include that in the mvsdk.

Daggolin wrote:Tr!Force, he was not asking how to "bypass" the amount of submodels on both ends, but how to solve the CM_InlineModel (bad number) error. Your last codepiece however removed all entities with subModels > 127, so that is exactly what he needs to do in a mod. I think my approach for that looked roughly like that:

the -8 tells the game to interpret it as signed 8 bit. If they actually made that 8 instead of -8 we could use the full 256 submodels. And when making a jk2 version with more submodels one should also increase the amount of networked bits, but that makes that version of jk2 incompatible to normal jk2. :/

have u looked for how jk3 (or jk2 sp) does? maybe there is a reference :/

Daggolin wrote:
I once tried to make a clientside that reads modelindex as 8-bit unsigned and my client could use the full 256 submodels, even on basejk servers trying to load those SPMaps. However some other parts of the code (like dismember) work with negative modelindex values, so changing the networking from "-8" to "8" is probably going to cause other side-effects and that's the reason we haven't done that in jk2mv.

But I had an idea for a work-around in cgame that might make the full 256 submodels usable, by assuming that negative modelindexes are overflows when loading subModels (cause negative subModels don't exist) and correcting them after getting them. Would be "hacky", but could actually work.

solve this via cgame would fantastic.

Daggolin wrote:
If I get to try that I am probably going to include that in the mvsdk.

Daggolin wrote:As far as I remember this is caused by the modelindex being an unsigned 8-bit integer, but getting networked as signed 8-bit integer. So any modelindex above 127 leads to an overflow and the client gets a CM_InlineModel() error./quote]
That... is really lame.

Daggolin wrote:But I had an idea for a work-around in cgame that might make the full 256 submodels usable, by assuming that negative modelindexes are overflows when loading subModels (cause negative subModels don't exist) and correcting them after getting them. Would be "hacky", but could actually work. If I get to try that I am probably going to include that in the mvsdk.

This is an interesting idea, I might give this a shot some time next week.

Hey guys, I was just trying to do TriForce's modifications, but I can't seem to find any of the 'target_speaker' stuff in the jk2mv code. Now, he writes 'game code'. Is it somewhere else? Is it some VM code thingy? Some info would be great.

Yes it's a game module not included in jk2mv I described earlier. I'm not really sure if there is any clean 1.04 source code with modern build scripts. I have one for linux but that's all. You can always download jk2 sdk 2.0 and use batch scripts included there. Or try this thing Triforce put together.

I see, thanks. I downloaded TriForce's code, but the compilers he claims are in there are not actually in there, so I will have to download them separately, I suppose. Maybe I'll give that SDK thing a try.

Tom Arrow wrote:I see, thanks. I downloaded TriForce's code, but the compilers he claims are in there are not actually in there, so I will have to download them separately, I suppose. Maybe I'll give that SDK thing a try.

Do you need qvm compiler though? If it's just for local testing you can compile to shared libraries with msvc. Put them in your mod directory and launch jk2mvmp with "+set vm_game 0 +set vm_cgame 0 +set vm_ui 0" commandline parameters. It's actually better for development because you can use generic C debuggers.

Sounds good. Shared libraries = dlls? I would need to compile those first, though. I have no idea how to set up the jk2mv solution in VS2013 to also build the shared libraries and how to go about that. If it's not too much hassle, input will be appreciated.

Here's what I'm trying to do: I want to use JK2MV to create ingame demos of SP maps. Nothing fancy, I basically just want this so that I can then use JoMME to create a camera path through SP maps and render this for a short outro of a project I'm working on.

I tried to run JK2MV with vm_game 0 and the other parameters, but it doesn't seem to have any effect. I tried putting the JoMME shared libraries (the ddls from the mme folder) into the base folder of JK2MV, but I can't tell if it does any difference. Then I changed the g_target and g_spawn codes in JoMME and tried to recompile ... to realize that Visual Studio does not recognize any change in the code and after forcing a recompile, the dll file stayed exactly the same (I use a file sync tool to synchronize the build folder with my jomme folder). What am I missing?

Yes, dlls need to be binary compatible with JK2MV - 64 bit. This is why qvms are so nice for mod distribution, no compatibility issues. They should compile just fine in 64bit mode. vm_game will fallback to 2 if it can't load dlls.

No, x86 jk2mv should work with x86 .dlls You could just download 32 bit jk2mv I believe. I checked for you and .dll names on windows need to look like this: "game_x86.dll" and "game_x64.dll" If you had read jk2mv log carefully you'd have figured it out.

This isn't high quality texture but high polygon curvature I believe. Try r_subdivisions 4 (for curvatures) and r_lodbias -2 for brush models. This may be also caused by some assumptions about fov in the renderer (I recall there were such) or patch stitching bug I fixed in jk2mv a while ago. If these cvars don't work, can you check if the same happens in jk2mv?

PS There is a simple avi rendering code for jk2mv that I wrote a while ago but haven't merged yet because it's not tested enough. It will render to uncompressed or motionJPEG avi with wav sound. Not trying to compete with jomme but wanted to make simple demo recording easier. If you want to use/test it, it's here: https://github.com/aufau/jk2mv/tree/avi