Warband Script Enhancer 2 (v1.1.2.5)

Users who are viewing this thread

Why does WSE2 set off Windows DEP Program??? Doing more behind the scenes than just for Warband?? Are you transmitting data from Users files other than Warband files?
 
Oh ok, Im using floris evolved from the steam workshop, does it has something to do with the error?

Heres the Screenshot
Mods with the old WSE are developed for Warband version 1.153. In new versions of Warband, many new operations have been added and the WSE's operations ID have all shifted, so completely incorrect operations are called in the scripts, which causes the game to crash. Only the mod developer can fix this.
 
Last edited:
Code:
void mbAgent::updateKicking()
{
    rglVector4 kickVec = rglVector4(-m_movementDir.x, m_movementDir.y, m_movementDir.z) * 0.1f + m_movementDir * 0.6f;
    rglVector4 kickPosition = m_position + kickVec;
    rglVector4 srcPos = m_position + rglVector4(0.0f, 0.0f, 0.5f);
    rglVector4 dstPos = srcPos + kickVec;
    rglBodyPart *hitBodyPart = NULL;
    rglEntity *hitEntity = NULL;
    float hitDistance = g_mission->getObstructingObject(srcPos, dstPos, &hitBodyPart, &hitEntity);
    bool hitBody = hitEntity || hitBodyPart;
    mbMissionGridIterator it;

    if (g_mission->m_grid.startIterating(kickPosition, 0.4f, it))
    {
        do
        {
            mbAgent *agent = it.m_node->m_agent;

            if (agent != this && agent->isAlive() && agent->isHuman() && agent->m_isOnGround && !agent->hasMount())
            {
                if (g_mission->m_isMultiplayer && g_networkManager.m_meleeFriendlyFire && !g_mission->m_inDuelMode || isEnemyWith(agent))
                {
                    rglVector4 distance = agent->m_position - kickPosition;
                    float area = distance.vec2().lengthSquared();

                    if (rglMax(1.0f / m_groundQuad->getNormal().z, 2.0f) * 0.25f + 0.55f > distance.z)
                    {
                        if (distance.z > -1.3f && area < rglConfig::Battle::fKickRange)
                        {
                            if (hitBody && (area < 0.05f || hitDistance - 0.75f > area))
                                hitBody = false;

                            if (!hitBody)
                            {
                                mbBlow blow;

                                blow.m_boneNo = hb_abdomen;
                                blow.m_direction = m_movementDir;
                                blow.m_rawDamage = (getTroop()->getAttribute(atr_str) + 10) * 0.35f * m_modifiers[am_damage];
                                blow.m_rotation = m_movementDir;
                                blow.m_agentNo = m_no;
                                blow.m_damageType = dt_blunt;
                                blow.m_weaponClass = bwc_unarmed;
                                blow.m_type = blt_kick;
                                blow.m_position = m_position + m_movementDir * 0.2f;
                                blow.setFlags(blf_interrupt|blf_stagger|blf_no_knockdown);
                                g_mission->deliverBlow(m_no, agent->m_no, blow);
                                m_kickState = 0;
                                break;
                            }
                        }
                    }
                }
            }
        }
        while (g_mission->m_grid.iterate(it));
    }
}
 
Back
Top Bottom