halflife icon indicating copy to clipboard operation
halflife copied to clipboard

[BUG] Dropped c4 location on radar

Open MPNumB opened this issue 13 years ago • 9 comments

Whenever you drop a c4 manually or by death from high place, you can notice that bomb location on radar is wrong.

MPNumB avatar Feb 17 '13 14:02 MPNumB

How wrong? Could you provide screenshots, maps to test, etc.

johndrinkwater avatar Feb 17 '13 14:02 johndrinkwater

Go to de_aztec for example, stand on a bridge, and drop bomb in water. You'll see, radar will tell you that bomb is still on the bridge.

MPNumB avatar Feb 17 '13 15:02 MPNumB

Screenshots too please, and the output of the "status" command when causing the bug.

alfred-valve avatar Feb 18 '13 22:02 alfred-valve

Basicly, bomb location on radar is gets drawn from the origin of the dropper. It should update bomb's location on radar when it actually lands on the ground.

5122a82ae4b042563c8f0521 Snapshot 2013-02-19 00 16 55

xPaw avatar Feb 18 '13 22:02 xPaw

bomb_radar_wrong

MPNumB avatar Feb 19 '13 03:02 MPNumB

Can't paste code here properly -.- How is the command? I'm using this to update bombs location.

public touch_weaponbox(iTouched, iToucher){
   if (is_valid_ent(iTouched)){
      new szModel[32]
      pev(iTouched, pev_model, szModel, 31)
      if (equal(szModel, "models/w_backpack.mdl")) set_task(0.1, "func_update_location", iTouched)
   }
}
public func_update_location(iEntity){
   if (is_valid_ent(iEntity)){
      new Float:f_vVelocity[3], szModel[32]
      pev(iEntity, pev_velocity, f_vVelocity)
      pev(iEntity, pev_model, szModel, 31)
      // Ensure weapon is on ground and didn't just touched a wall
      if (f_vVelocity[2] == 0.0 && equal(szModel, "models/w_backpack.mdl") && pev(iEntity, pev_flags) & FL_ONGROUND){
         new Float:f_vOrigin[3], vOrigin[3]
         pev(iEntity, pev_origin, f_vOrigin)
         FVecIVec(f_vOrigin, vOrigin)
         message_begin(MSG_BROADCAST, gMsgBombPickup)
         message_end()
         message_begin(MSG_BROADCAST, gMsgBombDrop)
         write_coord(vOrigin[0])
         write_coord(vOrigin[1])
         write_coord(vOrigin[2])
         write_byte(0)
         message_end()
      }
   }
}

ghost avatar Feb 19 '13 13:02 ghost

Not bad, but I would rather update bomb origin every 0.2 seconds if it changed.

MPNumB avatar Feb 19 '13 13:02 MPNumB

Ofcourse, it needs to be fixed by the game itself. My method is fired after a touch once.

ghost avatar Feb 19 '13 14:02 ghost

The overall bomb location on radar needs to be improved. It's often very off.

MaximilianKohler avatar Mar 28 '13 06:03 MaximilianKohler