Page 1 of 2

Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 10:13 am
by decompile
Hey Guys,

Someone actually asked me if it is possible to use the CS:S model size for CS:GO. I had actually no clue but I can remember there are few plugins like the Resizer for TF2 or maybe even in Hide & Seek, where your hitbox was the model?

Would it be actually possible by letting the user download a CS:S model and give it towards him on spawn?

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 10:39 am
by Ayuto
There is an entity attribute that controls the size of the model. I remember L'In20Cible posted an example for CS:GO to increase the size of a knife.

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 12:20 pm
by decompile
Ayuto wrote:There is an entity attribute that controls the size of the model. I remember L'In20Cible posted an example for CS:GO to increase the size of a knife.


Damn, you can remember stuff years ago :P

viewtopic.php?p=1174#p1174

I checked around and found:

m_flModelScale

m_flStepSize

The Question is if we need to modify the hitbox,
Since it will probably just LOOK larger, but has no effect as I want it.

If thats the part, we probably just need to modify:

m_vecSpecifiedSurroundingMins
and think there is a
m_vecSpecifiedSurroundingMax too? Not sure

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 1:19 pm
by D3CEPTION
why do you think css models arent working?

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 3:09 pm
by decompile
Wait what,

I just want to use CS:S Model Size for CS:GO (for game modes, like surf, since its much better cause of the tall hitbox of csgo models and all maps are ported from CS:S)

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 3:10 pm
by D3CEPTION
what hitbox? just use css-models and you should be fine?

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 3:16 pm
by D3CEPTION
for the data you posted:
m_vecSpecifiedSurroundingMins,m_vecSpecifiedSurroundingMax -> bounding box for movement calcs in vphysics, not the hitbox
m_flStepSize -> climbing dimension for stairstructures
m_flModelScale -> scales vertex positions in the studiomdl , NOT the skeleton position

if you still want to (re)define an actual hitbox set, create your armature/skeleton and assign the bones to the hitbox index in the models qc file

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 3:34 pm
by L'In20Cible

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 4:14 pm
by D3CEPTION
@L'In20Cible, lol, didnt notice. i only read mins,maxs and copied his post

m_Collision.m_vecMins, m_Collision.m_vecMaxs -> bounding box for movement calcs in vphysics, not the hitbox
m_vecSpecifiedSurroundingMins,m_vecSpecifiedSurroundingMax -> bounding box for hit registrations, not the hitbox (it only scales the hitreg box, not the hitbox sets geometry)
i would guess, that if you want to change the hitboxs actual geometry, you would have to hardcode it to the bones and compile it.

although i havent tested any of this, just my guesses

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 5:33 pm
by decompile
So how would I start with this now? Since you mixed up stuff for me.

Re: Using CS:S Model Size in CS:GO

Posted: Tue Sep 27, 2016 5:52 pm
by L'In20Cible
The following work for me:

Syntax: Select all

from events import Event
from players.entity import Player

hdrs = set()

@Event('player_spawn')
def player_spawn(game_event):
player = Player.from_userid(game_event.get_int('userid'))
hdr = player.model_header
if hdr.name in hdrs:
return
for index in range(hdr.hitbox_sets_count):
set_ = hdr.get_hitbox_set(index)
for index in range(set_.hitboxes_count):
hitbox = set_.get_hitbox(index)
hitbox.min *= 100
hitbox.max *= 100
hdrs.add(hdr.name)


Requires lastest commit: https://github.com/Source-Python-Dev-Te ... e48cfbc888

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 4:30 am
by D3CEPTION
adjusting css models to csgo -> fixing SOME stuff, doing some work.
its not like changing 1 value will fix/port it all for you.

@L'In20Cible why did you add it? noone will need it.. the function is used in gametrace etc, e.g. as hit register in raytracing on studimdl instance

@decompile first try loading your css model into csgo. find out what you dont like. come back and tell me. then i can tell you what data to change.

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 10:10 am
by L'In20Cible
D3CEPTION wrote:@L'In20Cible why did you add it? noone will need it.. the function is used in gametrace etc, e.g. as hit register in raytracing on studimdl instance
It was already exposed. I simply made them writeable so decompile can modify specific model hitboxes at run-time without the need to recompile the models like you suggested. And honnestly, who care if it is exposed and not used? I personally don't, do you? :rolleyes:

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 10:20 am
by D3CEPTION
well exposing stuff, that wont be used, can make things a bit messy and harder to find stuff. just wanted to state my opinion, really didnt mean to sound rude there, sorry ;) btw i suggested to recompile the hitbox set, if he has a different one, i DIDNT suggest to recompile with a different bbox. :P

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 10:30 am
by L'In20Cible
Actually, I find the studio package quite useful. It allow us to interact with animations, attachments, etc. For example, it is also used internally for Entity.lookup_attachment which is a requirement for Entity.set_parent as it accept the index, not the name. So I'd say the fact that "you" won't use it, is different than saying it is useless. :wink:

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 12:52 pm
by decompile
D3CEPTION wrote:adjusting css models to csgo -> fixing SOME stuff, doing some work.
its not like changing 1 value will fix/port it all for you.

@L'In20Cible why did you add it? noone will need it.. the function is used in gametrace etc, e.g. as hit register in raytracing on studimdl instance

@decompile first try loading your css model into csgo. find out what you dont like. come back and tell me. then i can tell you what data to change.


I think the best way to explain you what I want from the CS:S models is the units from the player itself.

CS:GO models are around 72 units tall, 54 units crouched. This is too much and makes surfing on CS:GO ported CS:S maps alot harder (Lets say a hole in the wall where you could walk in, could be walked in CS:S but you need to crouch in CS:GO to make it since its 63 units tall.

The CS:GO models should be changed to 62 units and 49 in crouch, if you want an answer to your question

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 1:15 pm
by D3CEPTION
@L'In20Cible im not talking about the whole package, you know this ;)
@decompile how about adjusting the map to the player model instead? how many maps do you plan converting to csgo? because gameplay-wise i would probably prefer that over changing the players geometry.

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 1:38 pm
by decompile
All maps are already ported, its exactly 450+ maps (Thats surf) and they have been just recompiled with CS:GO's hammer editor. This would take first ages and this is not the idea I had.

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 2:25 pm
by L'In20Cible
D3CEPTION wrote:@L'In20Cible im not talking about the whole package, you know this ;)

Then I have no idea what you are talking about. However, lets keep this thread to the main topic. If you have comments/suggestions about what should/shouldn't be exposed feel free to post in the appropriate forums: viewforum.php?f=8

Re: Using CS:S Model Size in CS:GO

Posted: Wed Sep 28, 2016 6:39 pm
by D3CEPTION
@decompile, i could fix your maps , instead of just porting them, wouldnt even take me long, but ok.. else i could still fix your model to adjust it to csgo, if thats really what you want.

@L'In20Cible, why are you qoting me on top of your monologue