Using CS:S Model Size in CS:GO

All other Source.Python topics and issues.
decompile
Senior Member
Posts: 282
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Using CS:S Model Size in CS:GO

Postby decompile » Tue Sep 27, 2016 10:13 am

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?
User avatar
Ayuto
Project Leader
Posts: 1577
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

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

Postby Ayuto » Tue Sep 27, 2016 10:39 am

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.
decompile
Senior Member
Posts: 282
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

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

Postby decompile » Tue Sep 27, 2016 12:20 pm

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
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Tue Sep 27, 2016 1:19 pm

why do you think css models arent working?
decompile
Senior Member
Posts: 282
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

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

Postby decompile » Tue Sep 27, 2016 3:09 pm

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)
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Tue Sep 27, 2016 3:10 pm

what hitbox? just use css-models and you should be fine?
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Tue Sep 27, 2016 3:16 pm

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
User avatar
L'In20Cible
Project Leader
Posts: 914
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

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

Postby L'In20Cible » Tue Sep 27, 2016 3:34 pm

User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Tue Sep 27, 2016 4:14 pm

@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
decompile
Senior Member
Posts: 282
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

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

Postby decompile » Tue Sep 27, 2016 5:33 pm

So how would I start with this now? Since you mixed up stuff for me.
User avatar
L'In20Cible
Project Leader
Posts: 914
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

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

Postby L'In20Cible » Tue Sep 27, 2016 5:52 pm

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
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Wed Sep 28, 2016 4:30 am

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.
User avatar
L'In20Cible
Project Leader
Posts: 914
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

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

Postby L'In20Cible » Wed Sep 28, 2016 10:10 am

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:
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Wed Sep 28, 2016 10:20 am

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
User avatar
L'In20Cible
Project Leader
Posts: 914
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

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

Postby L'In20Cible » Wed Sep 28, 2016 10:30 am

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:
decompile
Senior Member
Posts: 282
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

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

Postby decompile » Wed Sep 28, 2016 12:52 pm

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
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Wed Sep 28, 2016 1:15 pm

@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.
decompile
Senior Member
Posts: 282
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

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

Postby decompile » Wed Sep 28, 2016 1:38 pm

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.
User avatar
L'In20Cible
Project Leader
Posts: 914
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

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

Postby L'In20Cible » Wed Sep 28, 2016 2:25 pm

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
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Wed Sep 28, 2016 6:39 pm

@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

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest