Raised This Month: $12 Target: $400
 3% 

MODELINDEX doesn't work properly in my ZPA 1.6.1 server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 12-10-2021 , 14:10   MODELINDEX doesn't work properly in my ZPA 1.6.1 server
Reply With Quote #1

Hello. The “SET MODELINDEX OFFSET” has a bug. It would be good if someone explain to me how to fix the bug. You may help me to fix the bug, or, if it’s easier than making a fix, you can simply explain to me how to make the MODELINDEX option to not affect Nemesis and Assassin. In other words, instead of fixing the option and making it to work for Nemesis and Assassin, we can just make it to ignore Nemesis and Assassin.

Here is the option that has a bug (the option is in the .ini file of zombie plague advance):

Code:
; If you want your models to have accurate hitboxes, try enabling this.
; Note: make sure your models don't have messed up hitboxes, otherwise
; this setting might cause your server insane cpu usage and lag!
SET MODELINDEX OFFSET = 0


Here are the 2 states of the option:

“0” = off
“1” = on

Here I will give you more details in case you still don’t understand what this option is about:

So, if you are a fat zombie that is bigger and higher than a human-sized model (classical terrorist or counter-terrorist model) in a normal, classical CS 1.6 server, the bullets will simply pass through the model, without making any damage, if the place a human is shooting you at is at a higher point.

For example, if a model of a zombie is higher than a classical CS 1.6 human model, then the head of the zombie will be placed higher, too, right? In this case, if the height of a human model is 1 meter, while the zombie model is 1.5 meters, then the head of the human model will be at the level of the zombie model’s chest. So, if you shoot the zombie at the chest, instead of at its head, you will make the actual headshot, while if you shoot the zombie at its actual head, the bullets will simply pass through the zombie without dealing any damage.

If the zombie model is small, like a HeadCrab, then shooting the zombie at the head, which is at the level of the feet of a human-sized model, will make the same amount of damage as if you shoot a human at the feet. If you want to shoot the HeatCrab and make an actual headshot, you need to shoot in the air, at the level where a human head should be, where it seems there is nothing, but there is actually the head.

The MODELINDEX option fixes that problem, and allows bullets to hit the actual body parts of the zombie model, no matter where the body parts are placed, and regardless of whether or not the body parts are higher, bigger, or wider than the body parts of a human-sized model.

So, this is what the MODELINDEX option is about.

Do you understand what I’m saying? If you didn’t understand my explanation, ask me to explain it again in more details (my English is bad).

Although the option works perfectly when you shoot zombies, it doesn’t work that well when you are a human or a survivor and you shoot Nemesis or Assassin.

The bug affects any type of weapons – primary weapons, secondary weapons, and weapons that are extra items in the Extra Items menu of the zombie mod.

If you use AK-47, normally, you deal 35 or 43 damage when shooting at zombie’s body, and 140 damage when shooting the zombie at the head.

If you use M4A1, normally, you deal 24, 32, 38, 40 damage when you shoot a zombie at its body, and 128 (rarely 140-151) damage if you shoot it at the head.

If you use Golden AK-47, which I made it to have 10x DMG multiplier ("zp_goldenak_dmg_multiplier", "10"), you deal 262, 350, 463, 1400, and rarely 1700 damage, depending on where you shoot the zombie - lower body points = less damage - higher body points = more damage.

The lower the body point you shoot at is, the lower the DMG number will be. The higher the body point you shoot at is, the greater the DMG number will be. This is how it should be!

So, the above DMG numbers are the DMG amounts you will deal to zombies, nemesis, and assassin, IF the MODELINDEX option is DISABLED.
If the MODELINDEX is ENABLED, the above DMG numbers are the DMG amounts you will deal only to zombies, and not to assassin and nemesis, too.

If the MODELINDEX option is ENABLED, here are the DMG amounts of the same weapons mentioned in the above example about AK-47, M4A1, and Golden AK-47:

If the MODELINDEX option is ENABLED, and you use AK-47, the only amount of damage you will deal to Nemesis and Assassin is 35, regardless of what body part you shoot at. Even if you shoot them at the head, the damage will still be only 35.

If the MODELINDEX option is ENABLED, and you use M4A1, the only amount of damage you will deal to Nemesis and Assassin is 31 without a silencer and 32 with a silencer, regardless of what body part you shoot at. Even if you shoot them at the head, the damage will still be only 31 or 32.

If the MODELINDEX option is ENABLED, and you use Golden AK-47, the only amount of damage you will deal to Nemesis and Assassin is 350, regardless of what body part you shoot at. Even if you shoot them at the head, the damage will still be only 350.

Now, compare the example with enabled MODELINDEX to the example with disabled MODELINDEX, and you will see the problem.

The bug affects any type of weapon, even the weapons you can buy from the Extra Items menu (those are extra weapons added as separated plugins). I can give you such examples with all types of weapons I have on my server, but it’s not needed, because I think using 3 weapons is enough for making you understand what the problem is.

So, can someone explain to me how to fix this bug? If disabling MODELINDEX for Nemesis and Assassin, while remaining enabled only for zombies, let’s do it that way. I don’t need MODELINDEX for Nemesis’ model and Assassin’s model, because the models of Nemesis and Assassin are human-sized, anyway. MODELINDEX is needed only for models that are bigger/wider than human-sized models.

Again, I don't need MODELINDEX for Nemesis and Assassin, because the models of nemesis and assassin are human-sized. So, if it's easier for you to help me make MODELINDEX disabled for nemesis and assassin or simply to make the option's functions to be returned when Nemesis or Assassin are detected, do it that way, instead of trying to fix the whole MODELINDEX code in order to make it work for Nemesis and Assassin, too.

Here is the default code of ZPA 1.6.1: https://pastebin.com/16TDqswu

Thanks in advance.
GlobalPlague is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 12-13-2021 , 02:40   Re: MODELINDEX doesn't work properly in my ZPA 1.6.1 server
Reply With Quote #2

All of this long post can be sum up in 1 sentence: Because the model hitbox was not correct to where it should be.

The setting change the hitbox based on the model. If set to 0, the hitbox is the regular CS 1.6 player model hitbox.
This is the problem with the model, not about the setting.
For example if the model index was turned on:
- CSO Heavy Zombie got head hitbox at his leg
- CSO Light Zombie got hitbox even lower and you can't even shot her head when you are in duct because there is no hitbox there.
- Classic ZP Model don't even have any hitbox other than body.

I personally think it is a way to counter those using aimbot since they will aim to the head hitbox of regular model and it will miss 9/10 times and player using cl_minmodel 1 to hit easier can't hit because different hitbox
__________________
My plugin:

Last edited by Celena Luna; 12-13-2021 at 02:43.
Celena Luna is offline
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 12-13-2021 , 02:50   Re: MODELINDEX doesn't work properly in my ZPA 1.6.1 server
Reply With Quote #3

Quote:
Originally Posted by Celena Luna View Post
- Classic ZP Model don't even have any hitbox other than body.
I use "zombie_source.mdl", the classic ZP model, for the Assassin in my server. However, the MODELINDEX still doesn't work. See my first post to see what problem I have with hitboxes of Assassin, even when the model of Assassin is the default ZP model.

I decided to simply remove the code segments responsible for Assassin and Nemesis MODELINDEX, while keeping code segments responsible for zombies' models. This is the best way to solve the problem. I got some errors, but I will fix some of them - the rest of them, if I can't fix them, I will ask for help in this forum.

Thanks for answering my thread, by the way.
GlobalPlague is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 12-14-2021 , 00:05   Re: MODELINDEX doesn't work properly in my ZPA 1.6.1 server
Reply With Quote #4

Quote:
Originally Posted by GlobalPlague View Post
I use "zombie_source.mdl", the classic ZP model, for the Assassin in my server. However, the MODELINDEX still doesn't work. See my first post to see what problem I have with hitboxes of Assassin, even when the model of Assassin is the default ZP model.
Like I said Because the "zombie_source.mdl" model does not have hitbox info declare where is the head, arm, leg,... ;all part of the model are count as "body" so it will all does the same amount of damage.
If you turn modelindex on with "zombie_source.mdl" model, you can't even headshot it

I found a site that have a model that "fix" it but the it seem like the file does not available anymore
https://en.ds-servers.com/skins/cs/o...mdl-fixed.html
__________________
My plugin:

Last edited by Celena Luna; 12-14-2021 at 00:08.
Celena Luna is offline
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 12-14-2021 , 16:15   Re: MODELINDEX doesn't work properly in my ZPA 1.6.1 server
Reply With Quote #5

Quote:
Originally Posted by Celena Luna View Post
Like I said Because the "zombie_source.mdl" model does not have hitbox info declare where is the head, arm, leg,... ;all part of the model are count as "body" so it will all does the same amount of damage.
If you turn modelindex on with "zombie_source.mdl" model, you can't even headshot it

I found a site that have a model that "fix" it but the it seem like the file does not available anymore
https://en.ds-servers.com/skins/cs/o...mdl-fixed.html
Wow! Thank you a lot for explaining this to me. I wasted tons of time trying to edit the MODELINDEX code, believing the code itself had bugs. I never got results from my edits, because the bugs I was trying to remove never existed. The problems are not coming from the MODELINDEX code, but from the models I'm using. I didn't know that.

I changed the models with other models with correct hit-boxes, and now the MODELINDEX option works perfectly for Nemesis and Assassin, too.

If it wasn't you to tell me the problems are coming from the models, not from the code, who knows how much more time I would spend trying to find and fix bugs that do not actually exist.

Thank you a lot!
GlobalPlague is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode