Coder Social home page Coder Social logo

Comments (10)

jeefo avatar jeefo commented on September 26, 2024

It's pretty much logical imho, but not for deathmatch maps ofc.

from yapb.

that-is-not-great avatar that-is-not-great commented on September 26, 2024

this is not logical AT ALL. if you want to code good bots, the bot should behave like a human, he should not turn robot-like to the killer. is this behavior caused from your yapb code or from the game engine?

from yapb.

jeefo avatar jeefo commented on September 26, 2024

you can fix it yourself if u want. it's not a bug, a PR with ability to disable this thing will be accepted.

you need to remove this:
image

[here](https://github.com/yapb/yapb/blob/01046f7c9ad5bc877551d31c537d8480170138f2/src/manager.cpp#L1263C10-L1263C10)

from yapb.

that-is-not-great avatar that-is-not-great commented on September 26, 2024

you can fix it yourself if u want. it's not a bug, a PR with ability to disable this thing will be accepted.

you need to remove this: image

[here](https://github.com/yapb/yapb/blob/01046f7c9ad5bc877551d31c537d8480170138f2/src/manager.cpp#L1263C10-L1263C10)

i have completely commented this part, but the victim bot still turns to me the killer... it must be somewhere else

from yapb.

jeefo avatar jeefo commented on September 26, 2024

Probably here too:

yapb/src/combat.cpp

Lines 381 to 394 in 01046f7

// now alarm all teammates who see this bot & don't have an actual enemy of the bots enemy should simulate human players seeing a teammate firing
for (const auto &other : bots) {
if (!other->m_isAlive || other->m_team != m_team || other.get () == this) {
continue;
}
if (other->m_seeEnemyTime + 2.0f < game.time () && game.isNullEntity (other->m_lastEnemy) && util.isVisible (pev->origin, other->ent ()) && other->isInViewCone (pev->origin)) {
other->m_lastEnemy = newEnemy;
other->m_lastEnemyOrigin = m_lastEnemyOrigin;
other->m_seeEnemyTime = game.time ();
other->m_states |= (Sense::SuspectEnemy | Sense::HearingEnemy);
other->m_aimFlags |= AimFlags::LastEnemy;
}
}

from yapb.

that-is-not-great avatar that-is-not-great commented on September 26, 2024

that is not relevant code, its about the victim bot that is being killed, from an angle not visible for him.
i have commented your posted codes already

i have also commented all assignments everywhere in my crazy search:

// m_seeEnemyTime =
// m_seeEnemyTime = 
// m_enemy = 
// m_enemyOrigin = 
// m_lookAt = // if its an entity

now still the bot turns to me on dying, how is that possible

and even crazier, i have

// updateAimDir ();
// updateLookAngles (); // both
// lookupEnemies ();

so what else causes the angle turning?

also why does handleDeath get called before takeDamage on bot death?

from yapb.

jeefo avatar jeefo commented on September 26, 2024

OK, i have re-read topic on the pc.. and i have misunderstood your question from a start :)

Well, it's game related. Bot's doesn't control dying/dead player in any things besides chat. Angles of player model is not adjusted in any way.

also why does handleDeath get called before takeDamage on bot death?

they get called by game, from network message handler, so i got no idea, you check out regamedll sources for that.

from yapb.

that-is-not-great avatar that-is-not-great commented on September 26, 2024

so this is not from yapb?
what is the best way to prevent this angle turning on dying to the killer? basically i want the bot to stay on the angle of dying predeath. btw it only happens on bot victims, not human victims.

(btw i have quickly tested with amxx, on predeath i save his pev_angles and force these on posthink until the dying is over, that is a dirty fix). so basically i want to do the same in yapb

from yapb.

jeefo avatar jeefo commented on September 26, 2024

This happens randomly with all fakeclients, just tested with official cs bots, same result. so probably dirty fix is a good idea.

from yapb.

that-is-not-great avatar that-is-not-great commented on September 26, 2024

ok thanks man, i was going crazy

from yapb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.