Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete(); documentation is wrong #71

Open
tomangelo2 opened this issue Jan 17, 2018 · 2 comments
Open

delete(); documentation is wrong #71

tomangelo2 opened this issue Jan 17, 2018 · 2 comments

Comments

@tomangelo2
Copy link
Member

Official documentation states:

delete() - Damages the object, 1: object's ID, 2: magnifyDamage multiplier, without 2 the object explodes

so it looks like second parameter should only increase/decrease amount of damage to object. But values >1 doesn't just do incredible damage, instead it results in buildings flying into space, reversed build animation, or game just crash because, for example, it gives up trying to (probably) drown a BotFactory:

Assertion failed!

Program: C:\Program Files (x86)\colobot\wuasne\colobot.exe
File: C:/Users/student/repo/colobot/src/object/old_object.cpp, Line 445

Expression: type != DestructionType::Drowned || m_type == OBJECT_HUMAN

Either we should improve documentation to match it to actual effects, or fix those crazy behaviors. In any case, this function shouldn't crash whole game.

@tomangelo2 tomangelo2 changed the title destroy(); behaviour is quite weird delete(); behaviour is quite weird Jan 17, 2018
@krzys-h
Copy link
Member

krzys-h commented Jan 17, 2018

The docs are wrong, second argument is explosion type

@krzys-h krzys-h changed the title delete(); behaviour is quite weird delete(); documentation is wrong Jan 17, 2018
@X64E
Copy link
Contributor

X64E commented Dec 17, 2021

@MrSimbax May be move this issue to https://github.com/colobot/colobot-data repo ?

@MrSimbax MrSimbax transferred this issue from colobot/colobot Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants