[BUG] Dropped c4 location on radar
Whenever you drop a c4 manually or by death from high place, you can notice that bomb location on radar is wrong.
How wrong? Could you provide screenshots, maps to test, etc.
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.
Screenshots too please, and the output of the "status" command when causing the bug.
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.

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()
}
}
}
Not bad, but I would rather update bomb origin every 0.2 seconds if it changed.
Ofcourse, it needs to be fixed by the game itself. My method is fired after a touch once.
The overall bomb location on radar needs to be improved. It's often very off.